Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* 16. Program to find whether week day or week end using enum */
- #include<conio.h>
- #include<stdio.h>
- enum day
- {
- sun, mon, tue, wed, thu, fri, sat
- };
- void main()
- {
- enum day today;
- int x;
- clrscr();
- printf(" Please Enter Of The Week (0 to 6) : ");
- scanf("%d",&x);
- today=x;
- if(today==sun || today==sat)
- {
- printf("\n Enjoy");
- }
- else
- {
- printf("\n Week Day Do You Work");
- }
- getch();
- }
Add Comment
Please, Sign In to add comment