fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main(void) {int i,j,n;
  4. //scanf("%d",&n);
  5. n=5;
  6. for(i=1;i<=n;i++){
  7. for(j=n;j>i;j--){
  8. printf(" ");}
  9. for(j=1;j<=i;j++){
  10. printf("*");}
  11. if(i==n){break;}
  12. printf("\n");
  13. }
  14.  
  15.  
  16. // your code goes here
  17. return 0;
  18. }
  19.  
  20.  
  21.  
Success #stdin #stdout 0s 5408KB
stdin
Standard input is empty
stdout
    *
   **
  ***
 ****
*****