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

*
**
***
****

*
**
***
****
*****