Advertisement
Md_hosen_zisad

NESTED3

Aug 21st, 2017
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1.  
  2. #include<stdio.h>
  3. int main()
  4. {
  5.     int i,n,j,k;
  6.     scanf("%d",&n);
  7.     for(i=1;i<=n;i++)
  8.     {
  9.         for(j=5;j>i;j--)
  10.         {
  11.             printf(" ");
  12.         }
  13.         for(k=1;k<=i;k++)
  14.         {
  15.             printf("*");
  16.  
  17.         } printf("\n");
  18.          }
  19.          return 0;
  20.               }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement