执行程序时的输入为123456789,则程序的运行结果为 【7】 。
#include "stdio.h"
main()
{ int a,b;
scanf( "%2d%*2d%1d",&a,&b);
printf( "%d\n",a-b);}
第1题:
若执行下列程序时从键盘上输入2,则输出结果是( )。
#inclUde<stdio.h>
main()
{int a;
scanf("%d",&A);
if(a++<3)
printf("%d\n",A);
else printf("%d\n",a--);
}
A.1
B.3
C.2
D.4
第2题:
若执行下列的程序时,从键盘上输入1和2,则输出结果是( )。 #include<stdio.h> main() { int a,b,s; scanf("%d%d",&a,&b); s=a; if(a<b) s=b; S=S*S, printf("%d\n",s); }
A.1
B.4
C.2
D.9
第3题:
执行以下程序时输入1234567<CR>,则输出结果是【 】。
include <stdio.h>
main()
{ int a=1,b;
scanf("%2d%2d",&a,&b); prinff("%d %dhn",a,b);
}
第4题:
若执行下列的程序时,从键盘上输入1和2,则输出结果是( )。 #include<stdio.h> main() { int a,b,s; scanf("%d%d",&a,&b); s=a; if(a<b) s=b; s=s*s; printf("%d\n",s); }
A.1
B.4
C.2
D.9
第5题:
若执行下列的程序时,从键盘上输入1和2,则输出结果是( )。
#include<stdio.h>
main()
{ int a,b,s;
scanf("%d%d",&a,&B) ;
S=a;
if(a<B) s=b;
s=s*s;
printtf("%d\n",s);
}
A.1
B.4
C.2
D.9