imtiazaasif

star pattern

Dec 3rd, 2022
447
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.27 KB | Source Code | 0 0
  1. #include <stdio.h>
  2.  
  3. int main() {
  4.     int i , j , n;
  5.     n=5;
  6.  
  7.     for(i=1;i<=n;i++){
  8.         for(j=1;j<=5;j++){
  9.            if(j>=i) printf("&");
  10.            else printf(" ");
  11.         }
  12.         printf("\n");
  13.     }
  14.  
  15. }
  16.  
  17.  
  18. //&&&&&
  19. // &&&&
  20. //  &&&
  21. //   &&
  22. //    &
Advertisement
Add Comment
Please, Sign In to add comment