19 lines
598 B
C
19 lines
598 B
C
/* 这段程序无错误 */
|
|
#include <stdio.h>
|
|
int main(void)
|
|
{
|
|
int n, n2, n3;//修正语法错误
|
|
n = 5;
|
|
n2 = n * n;
|
|
n3 = n2 * n;//修正语义错误
|
|
printf("n = %d, n squared = %d, n cubed = %d\n", n, n2, n3);//修正语法错误
|
|
|
|
return 0;
|
|
}
|
|
/* 附上不能用来做变量名的关键字
|
|
auto break case char const continue default
|
|
do double else enum extern float for goto
|
|
if inline int long register restrict return
|
|
short signed sizeof static struct switch typedef
|
|
union unsigned void volatile _Bool _Complex _Generic
|
|
_Imaginary _Noreturn _Static_assert _Thread_local*/ |