Virajsinh

B_PRM_16

Nov 29th, 2017
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.42 KB | None | 0 0
  1. /* 16. Program to find whether week day or week end using enum  */
  2.  
  3. #include<conio.h>
  4. #include<stdio.h>
  5.  
  6. enum day
  7. {
  8.     sun, mon, tue, wed, thu, fri, sat
  9. };
  10.  
  11. void main()
  12. {
  13.     enum day today;
  14.     int x;
  15.     clrscr();
  16.  
  17.     printf(" Please Enter Of The Week (0 to 6) : ");
  18.     scanf("%d",&x);
  19.     today=x;
  20.     if(today==sun || today==sat)
  21.     {
  22.         printf("\n Enjoy");
  23.     }
  24.     else
  25.     {
  26.         printf("\n Week Day Do You Work");
  27.     }
  28.  
  29.     getch();
  30. }
Add Comment
Please, Sign In to add comment