fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. puts(" 1 2 3 4 5 6 7 8 9\n--------multiplication table----");
  5. for (int x = 1; x < 10; x++) {
  6. for (int y = 1; y < 10; y++) printf(y < x ? " " : "%3d", x * y);
  7. puts("");
  8. }
  9. puts("\n-------------------------------");
  10. return 0;
  11. }
  12.  
Success #stdin #stdout 0s 5340KB
stdin
Standard input is empty
stdout
  1  2  3  4  5  6  7  8  9
--------multiplication table----
  1  2  3  4  5  6  7  8  9
     4  6  8 10 12 14 16 18
        9 12 15 18 21 24 27
          16 20 24 28 32 36
             25 30 35 40 45
                36 42 48 54
                   49 56 63
                      64 72
                         81

-------------------------------