// multiplier.cpp
// 2022/09/13 by marsee
//
#include <stdint.h>
int multiplier(int16_t a, int16_t b, int32_t *c){
*c = a * b;
return(0);
}
// multiplier_tb.cpp
// 2022/09/13 by marsee
//
#include <stdio.h>
#include <stdint.h>
int multiplier(int16_t a, int16_t b, int32_t *c);
int main(){
int16_t a, b;
int32_t c;
a = 3;
b = 4;
multiplier(a, b, &c);
printf("a = %d, b = %d, c = (a*b) = %d\n", a, b, c);
return(0);
}
日 | 月 | 火 | 水 | 木 | 金 | 土 |
---|---|---|---|---|---|---|
- | - | - | - | - | 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 | - | - | - | - | - | - |