若运行以下程序时输入:A<回车>,则程序的运行结果是 。#include int main(){char ch;scanf("%c",&ch);ch=(ch>='A' && ch<='Z') ? (ch+32) : ch;printf("%c\n",ch);return 0;}
查看答案
若运行以下程序时输入:-5<回车>,则程序的运行结果是 。#include int main(){int x,y;scanf("%d",&x);if(x<0)y=-1;elseif(x==0) y=0;else y=1;printf("x=%d,y=%d\n",x,y);return 0;}
若运行以下程序时输入:5<回车>,则程序的运行结果是 。#include int main(){int x,y;scanf("%d",&x);if (x>=0)if (x>0) y=1;else y=0;else y=-1;printf("x=%d,y=%d\n",x,y);return 0;}
若运行以下程序时输入:A<回车>,则程序的运行结果是 。#include int main(){char grade;scanf("%c",&grade);printf("Your score:");switch(grade){case 'A': printf("85~100\n");break;case 'B': printf("70~84\n");break;case 'C': printf("60~69\n");break;case 'D': printf("<60\n");break;default: printf("data error!\n");}return 0;}
若运行以下程序时输入:A<回车>,则程序的运行结果是 。#include int main(){char grade;scanf("%c",&grade);printf("Your score:");switch(grade){case 'A': printf("85~100\n");case 'B': printf("70~84\n");case 'C': printf("60~69\n");case 'D': printf("<60\n");default: printf("data error!\n");}return 0;}