#include (stdio.h); main() { scanf("%x,%y",&x,&y); p = prodct(x,t); printf("The prodct is:", p) int

#include (stdio.h);
main()
{
scanf("%x,%y",&x,&y);
p = prodct(x,t);
printf("The prodct is:", p)
int product(int a,int b)
int c
c=a*b
return c
}请问如何修改这程序,谢谢!谢谢!

#include "stdio.h"
int product(int a,int b)
{
int c;
c=a*b;
return c;
}
int main()
{
int x,y;
printf("请输入整数x和y(以逗号分隔如6,6):");
scanf("%d,%d",&x,&y);
int p = product(x,y);
printf("The prodct is:%d\n", p);
return 0;
}
/*
结果:
------------------------
请输入整数x和y(以逗号分隔如6,6):6,6
The prodct is:36
Press any key to continue
------------------------------
*/
温馨提示:内容为网友见解,仅供参考
第1个回答  2012-10-21
代码,错误挺多的
#include <stdio.h>
int product(int a,int b);
void main()
{
int x,y,p;
scanf("%d,%d",&x,&y);
p=product(x,y);
printf("The prodct is:%d", p);}
int product(int a,int b)
{int c;
c=a*b;
return c;
}追问

还是有错误诶
: error LNK2001: unresolved external symbol _prodct
: fatal error LNK1120: 1 unresolved externals
不过还是谢谢谢谢,非常感谢

追答

我的没错啊

追问

但我的怎么不能运行呢?还出现以上错误,求解。
请问你知道是什么错误吗?thank啦~\(≧▽≦)/~啦啦啦

追答

你从新打开一个工程,把我的代码,复进去,在看看,

本回答被提问者采纳
相似回答