我得到的错误是"预期的标识符或'('浮动之前。"任何帮助都将受到赞赏。我已经读过它可能有在fprod之后用半冒号做什么?我尝试添加括号,如(float)fsum和(float)fprod,以及删除带有和没有括号的半结肠。
int main (void)
{
int x, y, z, fx, fy, fz, sum, prod, float fsum, float fprod;
//The error occurs on line 9. The above is line 9
printf("\n Enter the first integer number: ");
scanf("%d", &x);
if( x<=0){
printf("\n Invalid entry. Entry must be greater than 0.");
scanf("%d",&x);
}
printf("\n Enter the second integer number: ");
scanf("%d", &y);
if( y<=0){
printf("\n Invalid entry. Entry must be greater than 0.");
scanf("%d",&y);
}
答案 0 :(得分:4)