为了使运行下列程序后输出4,则输入的a和b值应满足的条件是()
main()
{int s=1,t=1,a,b;
scanf("%d,%d",&a,&b);
if(a>0)
s=s+1;
if(a>b)
t=s+1;
elseif (a==b) t=5;
else t=2*s;
printf("%d\n",t);
}
A.a〉b B.a〈b〈0 C.0〈a〈b D.0〉a〉b正确答案C
0) s=s+1;if(a>b) t=s+1; elseif (a==b) t=5;else t=2*s;printf("%d\n",t);}">
为了使运行下列程序后输出4,则输入的a和b值应满足的条件是()
main()
{int s=1,t=1,a,b;
scanf("%d,%d",&a,&b);
if(a>0)
s=s+1;
if(a>b)
t=s+1;
elseif (a==b) t=5;
else t=2*s;
printf("%d\n",t);
}
A.a〉b B.a〈b〈0 C.0〈a〈b D.0〉a〉b正确答案C