Advertisement
Guest User

Printf *

a guest
Jun 28th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. //លំហាត់ទី 2
  2. #include<stdio.h>
  3.  
  4. int main(){
  5.     int row=5;
  6.     int high=1;
  7.    
  8.     int row1=5;
  9.     int high1=5;
  10.    
  11.     for(int i=0;i<row;i++){        
  12.         for(int j=0;j<high;j++){   
  13.             printf("*");
  14.         }
  15.         printf("\n");
  16.         high++;
  17.     }
  18.    
  19.     for(int i=0;i<row1;i++){       
  20.         for(int j=0;j<high1;j++){  
  21.             printf("*");
  22.         }
  23.         printf("\n");
  24.         high1--;
  25.     }
  26.     getchar();
  27.     return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement