while and do while statements have the same function.
查看答案
Three expressions in the for loop statement, omitting the second expression indicates that the loop condition is true.
When executing the following segments ( ) x=-1; do {x=x*x;} while (!x);
A. Loop body will execute once
B. The loop body will execute twice
C. The loop body will execute many times
D. You will be prompted for a syntax error
main() {int s=0,a=1,n; scanf(“%d”,&n); do {s+=1;a=a-2;} while(a!=n); printf("%d\n”,s); }If you want the output value of the program to be 2, the value you should enter for n from the keyboard is ( ).
A. –1
B. –3
C. –5
D. 0
%f of scanf function, used to enter single precision real number in decimal form.