嗯,先写个乘法函数
#include <stdio.h>
int mul(int x, int y)
{
int z = 0;
z = x * y;
return z;
}
int main()
{
int a = 5;
int b = 8;
int c = mul(a, b);
printf("%d\n", c);
return 0;
}
先定义 mul 函数,然后在主函数中调用。
嗯,先写个乘法函数
#include <stdio.h>
int mul(int x, int y)
{
int z = 0;
z = x * y;
return z;
}
int main()
{
int a = 5;
int b = 8;
int c = mul(a, b);
printf("%d\n", c);
return 0;
}
先定义 mul 函数,然后在主函数中调用。