单选题:The function of the following program is to calculating area of
The function of the following program is to calculating area of circle. There is an **error** in the compiler, please find it.
```
#include
int main(){
int r ;
float s ;
scanf("%d",&r) ;
s=pi * r * r ; // 求面积
printf("s=%f\n",s) ;
return 0 ;
}
```
@[C](1)
A. Cannot use Chinese character in th comments
B. Cannot declare r to integer
C. Using invalid variable in statement:`s=pi * r * r ; `
D. Cannot have `s=` in output statement
A.Cannot use Chinese character in th comments
B.Cannot declare r to integer
C.Using invalid variable in statement:`s=pi * r * r ; `
D.Cannot have `s=` in output statement
答案:C
```
#include
int main(){
int r ;
float s ;
scanf("%d",&r) ;
s=pi * r * r ; // 求面积
printf("s=%f\n",s) ;
return 0 ;
}
```
@[C](1)
A. Cannot use Chinese character in th comments
B. Cannot declare r to integer
C. Using invalid variable in statement:`s=pi * r * r ; `
D. Cannot have `s=` in output statement
A.Cannot use Chinese character in th comments
B.Cannot declare r to integer
C.Using invalid variable in statement:`s=pi * r * r ; `
D.Cannot have `s=` in output statement
答案:C