fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4.  
  5. char nums[] = "123456789";
  6. char stars[] = "********";
  7.  
  8. for(int i=0; i<9; ++i)
  9. {
  10. printf("%.*s%.*s\n", i+1, nums, 9-i-1, stars);
  11. }
  12.  
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 5432KB
stdin
Standard input is empty
stdout
1********
12*******
123******
1234*****
12345****
123456***
1234567**
12345678*
123456789