fork download
  1. #include <stdio.h>
  2.  
  3. void number(int n){
  4.  
  5. printf("%3d",n);
  6. }
  7.  
  8. void stare(int m){
  9. number(m);
  10. for(int i=0;i<m;i++){
  11. printf("*");
  12. }
  13. printf("\n");
  14. }
  15.  
  16. int main (void){
  17. int i,n;
  18. n=5;
  19. for(i=0;i<n;i++){
  20. stare(i);
  21. }
  22. return 0;
  23. }
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
  0
  1*
  2**
  3***
  4****