字符串连接 strcmp#includevoid main(){ char c1[] = "Hello ", c2[]="WORLD", c3[13]; int i,j,k; i=j=k=0; while(c1[i] != '\0' || c1[j] != '\0'){ if(c1[i] != '\0'){ c3[k] = c1[i++]; }else{ c3[k] = c2[j++]; } k++; } c3[k]= '\0'; puts(c3);}
杨辉三角
#includevoid main(){ int i,j,test[10][10]; for(i=0;i<10;i++){ test[i][0] = 1; test[i][i] = 1; } for(i=2;i<10;i++){ for(j=1;j