home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / ctutor2.zip / ANSWERS / CH04_1.C < prev    next >
Text File  |  1989-11-10  |  348b  |  29 lines

  1. main()
  2. {
  3. int index, square;
  4.  
  5.    for(index = 1;index < 13; index = index + 1) {
  6.       square = index * index;
  7.       printf("%5d%5d\n",index, square);
  8.    }
  9. }
  10.  
  11.  
  12.  
  13. /* Result of execution
  14.  
  15.     1    1
  16.     2    4
  17.     3    9
  18.     4   16
  19.     5   25
  20.     6   36
  21.     7   49
  22.     8   64
  23.     9   81
  24.    10  100
  25.    11  121
  26.    12  144
  27.  
  28. */
  29.