1
|
---|
(a) |
---|
#include <stdio.h> main(){ printf("abcde"); } |
(b) |
---|
#include <stdio.h> main(){ printf("abcde") } |
int a,b,c,d,e,f,g,i,j; |
int a,i; i=2; a=i+(i++); printf("(1) i,a=%d,%d \n", i, a); i=2; a=(i--)+i; printf("(2) i,a=%d,%d \n", i, a); i=2; a=i+(++i); printf("(3) i,a=%d,%d \n", i, a); i=2; a=i+i; i=i+1; printf("(4) i,a=%d,%d \n", i, a); i=2; a=i+i; i=i-1; printf("(5) i,a=%d,%d \n", i, a); i=2; i=i+1; a=i+i; printf("(6) i,a=%d,%d \n", i, a); |
int m,n; float x,y; int a,b,c,d,e,f,g,h; int i,j |
|
| ||||
|
| ||||
|
| ||||
|
|
int i; for(i=0; i<10; i=i+1){ printf("i = %d\n",i); @ if( ( (5<i) && (7>i) ) || (i==2) ){ printf(" condition = true\n"); A } } |
#include <stdio.h> main() { int i,j; for(i=1; i<=7; i=i+1){ for(j=1; j<=7; j=i+1){ printf("%5d", i*j); } printf("\n"); } } |
#include <stdio.h> #include <stdlib.h> #include <time.h> main(){ int i,j,k; srand( (unsigned)time( NULL ) ); do{ i=rand(); }while(i>1000); do{ printf("Guess the Number ="); scanf("%d", &k); if(k<i){ printf("Too Little!\n"); } if(k>i){ printf("Too Large!\n"); } }while(k!=i); printf("****************************\n"); printf("*** (^o^) Congratulation ***\n"); printf("****************************\n"); } |