#include <stdio.h>
int main( )
{
int product(int a, int b );
int x, y, p;
/found/
scanf("%x%y", &x, &y);
p = product(x, y);
printf("The product is :%d\n", p);
}
int product(int a, int b )
{
int c ;
/found/
c= a*b;
/found/
}
你题目的解答代码如下:
#include <stdio.h>
int main()
{
int product(int a, int b);
int x, y, p;
scanf("%d%d", &x, &y); //改成%d
p = product(x, y);
printf("The product is :%d\n", p);
}
int product(int a, int b)
{
int c;
c = a * b;
return c; //加上return c;
}
如有帮助,请点击我的回答下方的【采纳该答案】按钮帮忙采纳下,谢谢!
#include <stdio.h>
int main( )
{
int product(int a, int b );
int x, y, p;
scanf("%d%d", &x, &y);
p = product(x, y);
printf("The product is :%d\n", p);
}
int product(int a, int b )
{
int c ;
c= a*b;
return c;
}
您好,我是有问必答小助手,您的问题已经有小伙伴帮您解答,感谢您对有问必答的支持与关注!