有以下程序:#include <stdio.h> ma
有以下程序:
#include <stdio.h>
main()
{
int s;
scanf("%d",&s);
while(s>0)
{
switch(s)
{
case 1:printf("%d",s+5);
case 2:printf("%d",s+4);break;
case 3:printf("%d",s+3);
default:printf("%d",s+1);break;
}
scanf("%d",&s);
}
}运行时,若输入1 2 3 4 5 0<回车>,则输出结果是( )。
答案
A