这是我写的 #include<stdio.h>
int main()
{ for(int i=1;i<=9;i++)
{
for(int j=1;j<=i;j++){
printf("%d*%d=%d ",j,i,j*i);
}
printf("\n");
}
下面是报错,我用的是c++
九九乘法表.c
E:\c\c++\Microsoft Visual Studio\Common\MSDev98\Bin\九九乘法表.c(3) : error C2143: syntax error : missing ';' before 'type'
E:\c\c++\Microsoft Visual Studio\Common\MSDev98\Bin\九九乘法表.c(3) : error C2143: syntax error : missing ';' before 'type'
E:\c\c++\Microsoft Visual Studio\Common\MSDev98\Bin\九九乘法表.c(3) : error C2143: syntax error : missing ')' before 'type'
E:\c\c++\Microsoft Visual Studio\Common\MSDev98\Bin\九九乘法表.c(3) : error C2143: syntax error : missing ';' before 'type'
E:\c\c++\Microsoft Visual Studio\Common\MSDev98\Bin\九九乘法表.c(3) : error C2065: 'i' : undeclared identifier
E:\c\c++\Microsoft Visual Studio\Common\MSDev98\Bin\九九乘法表.c(3) : warning C4552: '<=' : operator has no effect; expected operator with side-effect
E:\c\c++\Microsoft Visual Studio\Common\MSDev98\Bin\九九乘法表.c(3) : error C2059: syntax error : ')'
E:\c\c++\Microsoft Visual Studio\Common\MSDev98\Bin\九九乘法表.c(4) : error C2143: syntax error : missing ';' before '{'
E:\c\c++\Microsoft Visual Studio\Common\MSDev98\Bin\九九乘法表.c(5) : error C2143: syntax error : missing ';' before 'type'
E:\c\c++\Microsoft Visual Studio\Common\MSDev98\Bin\九九乘法表.c(5) : error C2143: syntax error : missing ';' before 'type'
E:\c\c++\Microsoft Visual Studio\Common\MSDev98\Bin\九九乘法表.c(5) : error C2143: syntax error : missing ')' before 'type'
E:\c\c++\Microsoft Visual Studio\Common\MSDev98\Bin\九九乘法表.c(5) : error C2143: syntax error : missing ';' before 'type'
E:\c\c++\Microsoft Visual Studio\Common\MSDev98\Bin\九九乘法表.c(5) : error C2065: 'j' : undeclared identifier
E:\c\c++\Microsoft Visual Studio\Common\MSDev98\Bin\九九乘法表.c(5) : warning C4552: '<=' : operator has no effect; expected operator with side-effect
E:\c\c++\Microsoft Visual Studio\Common\MSDev98\Bin\九九乘法表.c(5) : error C2059: syntax error : ')'
E:\c\c++\Microsoft Visual Studio\Common\MSDev98\Bin\九九乘法表.c(5) : error C2143: syntax error : missing ';' before '{'
执行 cl.exe 时出错.
} |
|