
已解决问题
谷歌用户在2015.02.03提交了关于“仰融求教C语言大神”的提问,欢迎大家涌跃发表自己的观点。目前共有3个回答,最后更新于2025-02-27T15:47:17。/*programtocalculatethepro**ctoftwo**mbers*/
#include<stdio.h>
intval1,val2,val3;
intpro**ct(intx,inty);
intmain(void)
{
/*getthefirst**mber*/
printf("Entera**mberbetween1and100:");
scanf("%d",&val1);
/*getthesceond**mber*/
printf("Enteranthor**mberbetween1and100:");
scanf("%d",&val2);
/*calculateanddisplaythepro**ct*/
val3=pro**ct(val1,val2);
printf("%dtimes%d=%d\n",&val1,&val2,&val3);
return0;
}
/*functionreturnthepro**ctofthetwovaluesprovided*/
intpro**ct(intx,inty);
{
return(x*y);
}
errorC2449:found'{'atfilescope(missingfunctionheader?)
errorC2059:syntaxerror:'}'怎么改?
详细问题描述及疑问:
/*programtocalculatethepro**ctoftwo**mbers*/
#include<stdio.h>
intval1,val2,val3;
intpro**ct(intx,inty);
intmain(void)
{
/*getthefirst**mber*/
printf("Entera**mberbetween1and100:");
scanf("%d",&val1);
/*getthesceond**mber*/
printf("Enteranthor**mberbetween1and100:");
scanf("%d",&val2);
/*calculateanddisplaythepro**ct*/
val3=pro**ct(val1,val2);
printf("%dtimes%d=%d\n",&val1,&val2,&val3);
return0;
}
/*functionreturnthepro**ctofthetwovaluesprovided*/
intpro**ct(intx,inty);
{
return(x*y);
}
errorC2449:found'{'atfilescope(missingfunctionheader?)
errorC2059:syntaxerror:'}'怎么改?