Advertisement
langbung01

O programing

Sep 3rd, 2019
348
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.23 KB | None | 0 0
  1. #include<stdio.h>
  2. void main(){
  3. int i;
  4. for(i=1;i<=15;i++){
  5. if((i<=5||(i>10&&i<=15))&&(i%2==1)){
  6. printf("0");
  7. }
  8. else if((i>=6&&i<=10)&&(i%2==0){
  9.     printf("O");}
  10. else{
  11. printf(" ");
  12. }
  13. if(i%5==0)
  14. {printf("\n");}
  15.      }
  16.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement