fork download
  1. #include <stdio.h>
  2.  
  3. int main ()
  4. {
  5. int NUM; /* input value */
  6. int TAB; /* table value */
  7. int SR; /* square root value */
  8. int i; /* loop increment */
  9.  
  10. printf ("Enter a number between 1-10: \n");
  11. scanf ("%d", &NUM);
  12. printf ("Table and SQR: \n");
  13. for (i = 1; i <=10; i++)
  14. {
  15. TAB = NUM * i;
  16. SR = TAB * TAB;
  17. printf ("\t%i %i \n", TAB, SR);
  18. }
  19.  
  20. return (0);
  21.  
  22. } /* end main */
Success #stdin #stdout 0s 10320KB
stdin
6
stdout
Enter a number between 1-10: 
Table and SQR: 
	6 36 
	12 144 
	18 324 
	24 576 
	30 900 
	36 1296 
	42 1764 
	48 2304 
	54 2916 
	60 3600