设有以下程序段 int x=0,s=0; while(!x!=0) s+=++x; printf("%d",s); 则()
程序运行结果为1
举一反三
- 设有程序段 : int x=0,s=0;while(!x!=0) s+=++x;printf (“%d”,s);, 则运行程序段后 ( )。
- 中国大学MOOC:设有以下程序段intx=0,s=0;while(!x!=0)s+=++x;printf(%d,s);则。
- 中国大学MOOC: 设有以下程序段int x=0,s=0; while(!x!=0) s+=++x; printf(%d,s);则下面描述中正确的是 。
- 2.设执行程序段,则有____。 int x=0,s=0; while(!x!=0) s+=++x; printf((“%d”,s);
- 中国大学MOOC: 设有以下程序:#include <stdio.h>main(){int x=0,s=0;while(!x!=0) s+=++x;printf("%d",s);}则执行结果为( )。
内容
- 0
对下面程序段描述正确的是 ______. int x=0,s=0; while (!x!=0) s+=++x; printf("%d",s);
- 1
设有以下程序段,则 _____。int x=0,s=0; while(!x!=0) s+=++x; printf("%d",s); A: 运行程序段后输出0 B: 运行程序段后输出1 C: 程序段中的表达式是非法的 D: 程序段执行无限次
- 2
对下面程序段描述正确的是______.intx=0,s=0;while(!x!=0)s+=++x;printf(%d,s);
- 3
对下面程序段描述正确的是() intx=0,s=0; while(!x!=0)s+=++x; printf("%d",s);
- 4
设有以下程序main(){intx=0,s=0;while(!x!=0){x++;s=s+x;}printf("%d",s);}则该程序的运行情况是().