Advertisement
Divyansh_Chourey

pattern: parallelogram

Mar 17th, 2024
438
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.25 KB | Source Code | 0 0
  1. #include<stdio.h>
  2. int main(){
  3.     int col;
  4.     printf("Enter number of columns: ");
  5.     scanf("%d", &col);
  6.    
  7.     for(int i=1; i<=4; i++){
  8.         for(int j=1; j < i; j++){printf(" ");}
  9.         for(int j =1; j <= col; j++){printf("*");}
  10.         printf("\n");
  11.     }
  12.    
  13.     return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement