单选题 C语言
题号 #2328932

有以下程序段
 int n,t=1,s=0;
 scanf("%d",&n);
 do{ s=s+t; t=t-2; }while (t!=n);
为使此程序段不陷入死循环,从键盘输入的数据应该是(  )

进入在线模考

参考答案

D

答案解析

暂无解析

你可能感兴趣的试题

A.n=0;                 
do{++n;}while(n<=0); 
B.n=0;    
while(1){n++;}         
C.n=10;                      
while(n);                        
D.for(n=0,i=1; ;i++) n+=i;
{n--;}
找试题 · 找答案 · 找资料 在线模考