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)
7.0
举一反三
- #include <stdio.h> 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); }
- 以下程序中,运行结果是36的有()。 A: B: include <stdio.h> C: define M(y) y*y int main() { printf("%d ",M(6+0)); return 0; } D: E: include <stdio.h> F: define M(y) (y)*(y) int main() { printf("%d ",M(6+0)); return 0; } G: H: include <stdio.h> int M(int y) { return y*y; } int main() { printf("%d ",M(6+0)); return 0; } I: J: include <stdio.h> int M(int y) { return (y)*(y); } int main() { printf("%d ",M(6+0)); return 0; }
- 下列程序的运行结果是 。 #include <stdio.h>int main(){ char ch='F';printf("%c",ch+32-3);return 0; }
- 以下程序输出结果是( ).#include <stdio.h>int main() { int a=2,*pa=&a; float n=5.888,b,*pn=&n; b=*pa+(int)*pn; printf("%.1f ",b); return 0;} A: 8 B: 7 C: 8.0 D: 7.0
- 在下列选项中,有正确的程序是( )。 A: B: include <stdio.h>; C: define ABC 345int main( ){int a1;a1=ABC;return 0;} D: E: include <stdio.h> F: define ABC 345;int main( ){int a1;a1=ABC;return 0;} G: H: include <stdio.h> I: define ABC 345int main( ){int a1;a1=ABC;return 0;} J: K: include <stdio.h> L: define ABC 345int main( ){a1=ABC;int a1;return 0;}
内容
- 0
使用scanf()函数时,在源程序开头必须写预处理命令( ) A: B: include <stdio.h> C: D: include <stdio > E: include <stdio.h> F: G: include <scanf.h>
- 1
离体根培养适宜的pH值范围一般为()。 A: 5.0~6.0 B: 4.0~5.0 C: 6.0~7.0 D: 3.0~4.0
- 2
培养真菌的最适合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
- 3
以下程序输出的结果为:( )#include <stdio.h>void main(){ int x=1,y=2,z=3;if(x>y)if(y>z) printf(〞%d〞,++z);else printf(〞%d〞,++y);printf(〞%d\n〞,x++);} A: 1 B: 0 C: 2 D: 3
- 4
int a = 3, b = 5;max( int a, int b ){int c;c= a > b ? a : b;return(c);}main(){int a = 9;printf("%d ", max(a, b));}运行结果为________。