#include void main() { float c=3.0,d=4.0; if(c>d) c=5.0; else if(c==d) c=6.0; else c=7.0; printf("%.1f ",c); }
举一反三
- 3、#include<stdio.h>int main____{float c=3.0,d=4.0;if (c>d) c=5.0;elseif(c==d) c=6.0;else c=7.0;printf("%.1f",c);return 0;}运行结果为:(4.0)
- 运行下面程序时,若从键盘输入数据为"6,5,7",则输出结果是. #include void main { int a,b,c; scanf("%d,%d,%d",&a,&b,&c); if (a>b) if (a>c) printf("%d ",a); else printf("%d ",c); else if (b>c) printf("%d ",b); else printf("%d ",c); }
- 培养真菌的最适合pH是( )。 A: 5.0~7.0 B: 3.0~5.0 C: 4.0~6.0 D: 2.0~4.0 E: 6.0~8.0
- 以下程序正确的是_____ A: B: include<;stdio.h>;int gNum;gNum=13;void main(){printf("%d\n", gNum);} C: D: include<;stdio.h>;void main(){int rob=17;printf("rob=%d\n", rop);}int rop=71; E: F: include<;stdio.h>;void main(){extern int outer;printf("outer=%d\n", outer);}int outer=33; G: H: include<;stdio.h>;void main(){extern int outer=33;printf("outer=%d\n", outer);}int outer=33;
- 执行以下程序输出结果是_______.#include <;stdio.h>;void main( ){ int n=9; if(n++ <; 10) printf("%d\n", n); else printf("%d\n", n--);} A: 11 B: 10 C: 9 D: 8