Advertisement
Md_hosen_zisad

nested12

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