题目内容

下列程序执行后的输出结果是___#include void main( ){ int a=5,b=60,c;if (a

A. 60/5=12
B. 60*5=300
C. 300
D. 12

查看答案
更多问题

运行下面程序时,若从键盘输入数据为"6,5,7",则输出结果是__#include void main( ){ int a,b,c;scanf("%d,%d,%d",&a,&b,&c);if (a>b)if (a>c)printf("%d\n",a);elseprintf("%d\n",c);elseif (b>c)printf("%d\n",b);elseprintf("%d\n",c);}

A. 7
B. 6
C. 5
D. 不定值

运行下面程序时,若从键盘输入"3,5",则程序的输出结果是__#include void main( ){int x,y;scanf("%d,%d",&x,&y);if (x==y)printf("x==y");else if (x>y)printf("x>y");elseprintf("x

A. 3<5
B. 5>3
C. x D. x>y

执行下面程序时,若从键盘输入"2",则程序的运行结果是____#include void main( ){ int k; char cp;cp=getchar( );if (cp>='0' && cp<='9')k=cp-'0';else if (cp>='a' && cp<='f')k=cp-'a'+10;else k=cp-'A'+10;printf("%d\n",k);}

A. 10
B. 1
C. 4
D. 2

运行下面程序时,从键盘输入"2.0",则输出结果是___#include void main( ){ float a,b;scanf("%f",&a);if (a<0.0) b=0.0;else if ((a<0.5) && (a!=2.0)) b=1.0/(a+2.0);else if (a<10.0) b=1.0/2;else b=10.0;printf("%f\n",b);}

A. 0.000000
B. 1.000000
C. 0.500000
D. 0.250000

答案查题题库