Miti059

5 star triangle

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