程序改错#include "stdio.h"main( ){ int x=4,y=5;z; ______ if(x
举一反三
- 以下程序没有语法问题的是() A: B: include<;stdio.h>;int main( ){int x , y = 5 ; printf( "%d\n" , x / y ) ; return 0 ;} C: D: include<;stdio.h>;int main( ){int x = 3 ;y = 5 ; printf( "%d\n" , x / y ) ; return 0 ;} E: F: include<;stdio.h>;int main( ){int x = 3 ,y ; printf( "%d\n" , x / y ) ;y = 5; return 0 ;} G: H: include<;stdio.h>;int main( ){int x = 3 , y = 5 ; printf( "%d\n" , x / y ) ; return 0 ;}
- 有如下程序:#include"stdio.h"int max(x,y)int x,y;{int z;if(x>;y) z=x;else z=y;return(z);}main(){extern int a,b;printf(”max=%d\n",max(a,b));}int a=3,b=5;运行结果为( )。 A: max=3 B: max=4 C: max=5 D: max=6
- #include "stdio.h" int main() { int x,y, (1) ; scanf("%d%d%d", &x,&y,&z); if(x>=y) (2) ; (3) max=y; if( (4) ) max=z; printf("%d\n",max); }
- 有以下程序 #include <stdio.h> int main(){ int x=1,y=2,z=3; if(x>y) if(y<z) printf("%d",++z); else printf("%d",++y); printf("%d ", x++ ); }
- 以下程序的输出结果:______________#include "stdio.h"int main(){ int x,y,z; x=1; y=2; z=3; if(x > y) if(x > z) printf("%d",x); else//注意else匹配的if printf("%d",y); printf("%d\n",z);}