以下程序用于判断a,b,c能否构成三角形,若能,输出YES,否则输出NO,请填空。#includevoid main ( ){float a,b,c;scanf(“%f%f%f”,&a,&b,&c);if(_____________________________)printf(________________________________);else printf(“NO\n”);}
查看答案
设有程序片段如下:switch(class){case 'A':printf("GREAT! ");case 'B':printf("GOOD! ");case 'C':printf("OK! ");case 'D':printf("NO! ");default:printf("ERROR! ");}若class的值为'B',则输出结果是 。
写出下列程序的运行结果#include void main(){int n='c';switch(n++){default:printf("error");break;case 'a': case 'A':case 'b':case 'B':printf("good");break;case 'c':case 'C':printf("pass");case 'd':case'D':printf("warm");}}
#includevoid main(){int a=-1,b=1;if((++a<0)&&(b--<=0))printf("%d,%d\n",a,b);else printf("%d,%d\n",b,a);}
#includevoid main(){int x=1,y=0,a=0,b=0;switch(x){case 1:switch(y){case 0:a++;break;case 1:b++;break;}case 2:a++;b++;break;}printf("a=%d,b=%d\n",a,b);}