imtiazaasif

star pattern2

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