下面程序 main() { int x=100,a=10,b=20,ok1=5,ok2=O; if(a<B) if(b!=15) if(!ok1) x=1; else if(ok2)x=10; x=1; printf("%d\n",x); } 的输出是______。A.-1B.0C.1D.不确定的值

下面程序 main() { int x=100,a=10,b=20,ok1=5,ok2=O; if(a<B) if(b!=15) if(!ok1) x=1; else if(ok2)x=10; x=1; printf("%d\n",x); } 的输出是______。

A.-1

B.0

C.1

D.不确定的值


相关考题:

有下面程序段: a:=false;b:=false;c:=false; x:=15; if a then x:=x0 else if b then x:=x-5 else if c then x:=20 else x:=25; 假设所有变量均已说明,程序运行后x的值是( ) 。 A25B20C15D5

以下程序的输出结果是【16】。main(){ int x=100, a=10, b=20, ok1=5, ok2=0;if(aelse if(ok2)x=10;else x=-1;printf("%d\n", x);}

阅读下面程序: include void f(int n) { int x(5); static int y(10); if(n>0) { ++ 阅读下面程序:include<iostream.h>void f(int n){int x(5);static int y(10);if(n>0){++x;++y;cout<<x<<","<<y<<endl;}}void main(){int m(1);f(m),}则该程序的输出结果是【 】

阅读下面的程序:includevoid main(){int x;cin>>x;if(x++>5)cout 阅读下面的程序: #include<iostream.h> void main() { int x; cin>>x; if(x++>5) cout<<x<<end1; else cout<<x--<<end1; } 如果两次执行上述程序,且键盘输入分别为4和6,则输出结果分别是( )。A.4,6B.3,6C.4,7D.5,7

下面程序的输出是main( ){int x=100,a=10,b=20,ok1=5,ok2=0;if(a<B)if(b!=15)if(!okl)x=1;elseif(ok2)x=10;x=-1;cout<<x<<endl;}A.-1B.0C.1D.不确定的值

下列程序的运行结果是()。includemain(){int a=0,b=4,c=0,d=10,x; if(a)d=d-10; elseif 下列程序的运行结果是( )。 #include<stdio.h> main() { int a=0,b=4,c=0,d=10,x; if(a) d=d-10; else if(!b) if(!c) x=15; else x=25; printf("%d\n",d); }A.5B.3C.20D.10

执行下列语句:includeusing namespace std;int main(){int x=3;if(x=5)cout 执行下列语句: #include<iostream> using namespace std; int main() { int x=3; if(x=5) cout<<x++<<end1; else cout<<x<<end1; return 0; } 程序的输出是( )。A.3B.4C.5D.6

下面程序 main() { int x=100, a=10, b=20, ok1=5, ok2=0; if(a<b) if(b!=15) if(!ok1) x=1; else if(ok2)x=10; x=1; printf("%d\n",x); } 的输出是______。A.-1B.0C.1D.不确定的值

下列程序的运行结果是()。includemain(){int x=5,a=1,b=2,c=5,d=0; if(a 下列程序的运行结果是( )。 #include<stdio.h> main() { int x=5,a=1,b=2,c=5,d=0; if(a<B) if(b!=3) if(!C) x=1; else if(D) x=1; else x=-1; printf("%d",x); }A.-1B.0C.1D.不确定的值

有以下程序:include int fun(int n){if(n == 1) return 1;else return( n + fun( n - 有以下程序:#include <stdio.h>int fun(int n){ if(n == 1) return 1; else return( n + fun( n - 1 ) );}main( ){ int x; seanf("% d" ,X) ;x = fun(x) ;pfinff( "% d \n" ,x);} 执行程序时,给变量x输入10,程序的输出结果是( )。A.55B.54C.65D.45

下面程序 main() { int x=100,a=10,b=20,okl=5,ok2=0; if(a<B) if(b!=15) if(!ik1) x=1; else if(ok2)x=10; x=-1; printf("%d\n",x); } 的输出是______。A.-1B.0C.1D.不确定的值

有以下程序include main(){int x; scanf("%d",x); if(x 有以下程序 #include <stdio.h> main() { int x; scanf("%d",x); if(x<=3); else if(x!=1O) printf("%d\n",x); } 程序运行时,输入的值在______范围才会有输出结果。A.不等于10的整数B.大于3且不等10的整数C.大于3或等于10的整数D.小于3的整数

下列程序的运行结果是()。includemain (){ int x=5, a=1, b=2, c=5, d=O ;if (a 下列程序的运行结果是( )。 #include<stdio.h> main () { int x=5, a=1, b=2, c=5, d=O ; if (a<b) if (b!=3) if (!c) x=1; else if(d)x=1; else x=-1; printf("%d",x); }A.-1B.0C.1D.不确定的值

下面程序的输出是 main() {int x=100, a=10, b=20, ok1=5, ok2=0; if(a<b) if(b! =15) if( ! ok1) else if(ok2) x= 10 x=-1 cout<<x<<end1; }A.-1B.0C.1D.不确定的值

下列程序的运行结果是()。includemain(){ int a=0,b=4,c=0,d=10,x;if(a) d=d-10;else i 下列程序的运行结果是( )。 #include<stdio.h> main() { int a=0,b=4,c=0,d=10,x; if(a) d=d-10; else if(!b) if(!c) x=15; else x=25; printf("%d\n",d); }A.5B.3C.20D.10

以下程序的输出结果是main(){ int x=100,a=10,b=20,ok1=5,ok2=0; if(ab)if(b!=15)if(!ok1)x=1; else if(ok2)x=10; else x=-1; printf("%d\n",x);}

以下程序运行后的输出结果是main(){ int x=15; while(x10x50) { x++; if(x/3) { x++; break; } else continue; } printf("%d\n",x);}

下面程序的输出结果是【】。includeint add(int a, int b);void main(){extern int x, 下面程序的输出结果是【 】。include<iostream.h>int add(int a, int b);void main(){extern int x, y;cout<<add(x, y)<<end1;}int x(20),y(5);int add(int a, int b){int s=a+ b;return s;}

有如下程序includevoid main( ){float x=2.O,y;if(x 有如下程序 #include<iostream.h> void main( ) { float x=2.O,y; if(x<O.0)y=0.0; else if(x<10.O)y=1.0/x; else y=1.0; cout<<y; } 该程序的输出结果是A.0B.0.25C.0.5D.1

【程序】SET TALK OFFINPUT “X=” TO XDO CASECASE X>10?“OK1”CASE X>20?“OK2”OTHERWISE?“OK3”ENDCASESET TALK ONRETURN程序运行时输入X值为9,则显示结果为 ______。A.“OK1”B.OK1C.“OK2”D.“OK3”

程序运行时输入X值为15,则显示结果为 ______。A.“OK1”B.OK1C.“OK2”D.“OK3”

程序运行时输入X值为100,则显示结果为 ______。A.“OK1”B.OK1C.“OK2”D.“OK3”

程序运行时输入X值为0,则显示结果为 ______。A.“OK1”B.OK1C.“OK2”D.“OK3”

下面程序输出的结果是( )。 main() { int x=100,a=10,b=20,ok1=5,ok2=0; if(a<b) if(b!=15) if(!ok1) x=-i; else if(ok2) x=10; x=1; printf("%d\n",x); }A.-1B.0C.1D.不确定的值

以下程序运行后的输出结果是【 】。main( ){ int x=15;while(x10 &&x50){ x++;if(x/3){ x++;break;}else continue;}printf("%d\n",x);}

请为下面的程序设计符合判定覆盖的测试用例。 int main() { int a,b,c,x,y,z,t; scanf(“d%,d%,d%”,a,b,c,t); if a5 t1 x=10 else x=1; if b10 y=20 else y=2; if c15 z=30 else z=3; printf(“d%,d%,d%/n”,x,y,z) }

问答题请为下面的程序设计符合判定覆盖的测试用例。 int main() { int a,b,c,x,y,z,t; scanf(“d%,d%,d%”,a,b,c,t); if a5 t10 y=20 else y=2; if c15 z=30 else z=3; printf(“d%,d%,d%/n”,x,y,z) }