fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int i;
  5. printf("n\tn^2");
  6. //loop through 10 numbers and print its square as well
  7. for(i=1;i<=10;i++)
  8. {
  9. printf("\n%d\t%d\n",i,i*i);
  10. }
  11.  
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0s 5408KB
stdin
Standard input is empty
stdout
n	n^2
1	1

2	4

3	9

4	16

5	25

6	36

7	49

8	64

9	81

10	100