home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / GENCSRC.ZIP / BIGARRAY.C < prev    next >
C/C++ Source or Header  |  1987-11-21  |  505b  |  21 lines

  1.                                          /* Chapter 7 - Program 4 */
  2. char name1[] = "First Program Title";
  3.  
  4. main()
  5. {
  6. int index;
  7. int stuff[12];
  8. float weird[12];
  9. static char name2[] = "Second Program Title";
  10.  
  11.    for (index = 0;index < 12;index++) {
  12.       stuff[index] = index + 10;
  13.       weird[index] = 12.0 * (index + 7);
  14.    }
  15.  
  16.    printf("%s\n",name1);
  17.    printf("%s\n\n",name2);
  18.    for (index = 0;index < 12;index++)
  19.       printf("%5d %5d %10.3f\n",index,stuff[index],weird[index]);
  20. }
  21.