-->
当前位置:首页 > 题库

单选题:The function of the following program is to calculating area of

Luz5年前 (2021-05-10)题库576
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