有以下程序 #include <stdio.h> main() { int x; scanf("%d",&x); if(x>15) printf("%d",x-5); if(x>10) printf("%d",x); if(x>5) printf("%d\n",x+5); } 若程序运行时从键盘输入12<回车>,则输出结果为( )。
A.7 B.1217 C.12 D.17正确答案B
15) printf("%d",x-5); if(x>10) printf("%d",x); if(x>5) printf("%d\n",x+5); } 若程序运行时从键盘输入12<回车>,则输出结果为( )。">
有以下程序 #include <stdio.h> main() { int x; scanf("%d",&x); if(x>15) printf("%d",x-5); if(x>10) printf("%d",x); if(x>5) printf("%d\n",x+5); } 若程序运行时从键盘输入12<回车>,则输出结果为( )。
A.7 B.1217 C.12 D.17正确答案B