#include<stdio.h>
int main(void)
[
double x,y;
printf("Enter x: ");
scanf("%1f",&x);
if(x!=0){
y=1/x
}
else{
y = 0;
}
printf("f(%02f) =%.1f\n", x,y);
return 0;
]
运行这个程序的时候--------------------Configuration: 999887 - Win32 Debug--------------------
Compiling...
99887.c
D:\999887\99887.c(4) : error C2143: syntax error : missing ']' before 'type'
D:\999887\99887.c(4) : error C2090: function returns array
D:\999887\99887.c(4) : error C2085: 'x' : not in formal parameter list
D:\999887\99887.c(4) : error C2085: 'y' : not in formal parameter list
D:\999887\99887.c(5) : error C2061: syntax error : identifier 'printf'
D:\999887\99887.c(6) : error C2143: syntax error : missing ')' before 'string'
D:\999887\99887.c(6) : error C2143: syntax error : missing '{' before 'string'
D:\999887\99887.c(6) : error C2059: syntax error : '<Unknown>'
D:\999887\99887.c(6) : error C2059: syntax error : ')'
D:\999887\99887.c(7) : error C2059: syntax error : 'if'
D:\999887\99887.c(9) : fatal error C1506: unrecoverable block scoping error
执行 cl.exe 时出错.
99887.obj - 1 error(s), 0 warning(s)怎么弄