在执行以下程序时,为了使输出结果为t=4,则给a和b输入的值应当满足的条件是______。 a=InputBox(“a=”) b=InputBox(“b=”) s=1 t=1 If a>0 Then s=s+1 End If If a>b Then t=s+1 Else If a=b Then t=5 Else t=2*s End If End If Print t
A.a>b
B.a<b<0
C.0<a<b
D.0>a>b
第1题:
以下程序运行时,输入3和4后输出的结果是______。 Private Sub Command1_Click() a=InputBox(“请输入a的值”) b=InputBox(“请输入b的值”) Print a+b End Sub
A.3+4
B.7
C.34
D.12
第2题:
执行以下程序时输入1234567<CR>,则输出结果是【 】。
include <stdio.h>
main()
{ int a=1,b;
scanf("%2d%2d",&a,&b); prinff("%d %dhn",a,b);
}
第3题:
【填空题】请阅读以下程序,为使输出时t值为4,输入量a和b应满足的条件是 。 main() {int s,t,a,b; scanf("%d,%d",&a,&b); s=1;t=1; if(a>0) s=s+1; if(a>b) t=s+t; else if(a==b) t=5; else t=2*s; printf("s=%d,t=%d",s,t); }
第4题:
在执行以下程序时,为了使输出结果为t=4,给a和b输入的值应该满足的条件是_______。 main() { int s,t,a,b; scanf("%d%d",&a,&B) ; s=1;t=1; if(a>0)s=s+1; if(a>B) t=s+t; else if(a==B) t=5; else t=2*s; printf("t=%d\n",t); }
A.a>b
B.a<b<0
C.0<a<b
D.0>a>b
第5题:
在执行以下程序时,为了使输出结果为t=4, 则给a和b输入的值应满足的条件是() #include<stdio.h> void main() { int s,t,a,b; scanf("%d,%d",&a,&b); s=1; t=1; if(a < 0) s=s+1; if(a > b) t=s+1; else if(a= =b) t=5; else t=2*s; printf("t=%dn",t); }
A.0 > a > b
B.a=0 < b
C.a=b < 0
D.a < b < 0