fork download
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int i,j,k,n;
  5. printf(" Please, Enter the no. of Rows : ");
  6. scanf("%d",&n);
  7. for(i=1;i<=n;i++)
  8. {
  9. for(j=n;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. }
Success #stdin #stdout 0s 5312KB
stdin
5
stdout
  Please, Enter the no. of Rows :     *
   **
  ***
 ****
*****