fork download
  1. #include<stdio.h>
  2. int main(){
  3. int rows,i,j;
  4. printf("Enter number of rows:");
  5. scanf("%d",&rows);
  6. for(i=rows;i>0;i--)
  7. {
  8. for(j=i;j>0;j--)
  9. {
  10. printf("* ");
  11. }
  12. printf("\n");
  13. }
  14. }
Success #stdin #stdout 0s 5304KB
stdin
5
stdout
Enter number of rows:* * * * * 
* * * * 
* * * 
* * 
*