for循环的小括号显示缺少“;”
显示错误#include <stdio.h>
int main()
{
int i;
int n;
scanf("%d", &n);
int fact = 1;
for ( i=2; i<=n, i++ ) {
fact =fact*i
}
printf("n!=%d", fact);
return 0;
}
/*错误信息:10 23 F:\编程文件\n!.c [Error] expected ';' before ')' token
11 8 F:\编程文件\n!.c [Error] expected ';' before 'fact'*/
[此贴子已经被作者于2018-12-1 13:09编辑过]