题目内容
执行以下程序,分别输入-10 ,5的结果是()。#include main( ){ int x,c,m;float y;scanf("%d",&x);if (x<0) c=-1;else c=x/10;switch (c){ case -1: y=0; break;case 0: y=x; break;case 1: y=10; break;case 2:case 3: y=-0.5*x+20; break;default: y=-2;}if (y!=-2) printf("y=%g\n",y);else printf("error\n");}
查看答案
搜索结果不匹配?点我反馈
更多问题