题目内容

若运行以下程序时输入:3.6,-3.2<回车>,则程序的运行结果是 。#include int main(){float a,b,t;scanf("%f,%f",&a,&b);if(a>b){t=a;a=b;b=t;}printf("%5.2f,%5.2f\n",a,b);return 0;}

查看答案
更多问题

若运行以下程序时输入:3,7,1<回车>,则程序的运行结果是 。#include int main(){float a,b,c,t;scanf("%f,%f,%f",&a,&b,&c);if(a>b){t=a;a=b;b=t;}if(a>c){t=a;a=c;c=t;}if(b>c){t=b;b=c;c=t;}printf("%5.2f,%5.2f,%5.2f\n",a,b,c);return 0;}

若运行以下程序时输入: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;}

答案查题题库