Virajsinh

B_PRM_17

Nov 29th, 2017
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.26 KB | None | 0 0
  1. /* 17. Write a program to print all values of enum  */
  2.  
  3. #include<stdio.h>
  4. #include<conio.h>
  5.  
  6. enum month {JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC};
  7.  
  8. void main()
  9. {
  10.  
  11.     int i;
  12.     clrscr();
  13.     for(i=JAN;i<=DEC;i++)
  14.     {
  15.         printf("\n %d",i);
  16.     }
  17.     getch();
  18. }
Add Comment
Please, Sign In to add comment