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