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

  1.                                          /* Chapter 6 - Program 3 */
  2. main()
  3. {
  4. enum {win,tie,bye,lose,no_show} result;
  5. enum {sun,mon,tues,wed,thur,fri,sat} days;
  6.  
  7.    result = win;
  8.    printf("    win = %d\n",result);
  9.    result = lose;
  10.    printf("   lose = %d\n",result);
  11.    result = tie;
  12.    printf("    tie = %d\n",result);
  13.    result = bye;
  14.    printf("    bye = %d\n",result);
  15.    result = no_show;
  16.    printf("no show = %d\n\n",result);
  17.  
  18.    for(days = mon;days < fri;days++)
  19.       printf("The day code is %d\n",days);
  20. }
  21.