fork download
  1. /* 練習14-4 */
  2.  
  3. #include<stdio.h>
  4.  
  5. main()
  6. {
  7. for(int i=1;i<=5;i++){
  8. for(int j=1;j<=7;j++){
  9. if((i==3)&&(j==4)){
  10. printf("× ");
  11. }else if(((i+j)%2)==0){
  12. printf("□ ");
  13. }else{
  14. printf("■ ");
  15. }
  16. }
  17. printf("\n");
  18. }
  19. }
  20.  
  21. /* */
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
□ ■ □ ■ □ ■ □ 
■ □ ■ □ ■ □ ■ 
□ ■ □ × □ ■ □ 
■ □ ■ □ ■ □ ■ 
□ ■ □ ■ □ ■ □