Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int a;
- printf("Enter a weekday number: ");
- scanf("%d", &a);
- if (a == 1)
- printf("%d is Saturday", a);
- else if (a == 2)
- printf("%d is Sunday", a);
- else if (a == 3)
- printf("%d is Monday", a);
- else if (a == 4)
- printf("%d is Tuesday", a);
- else if (a == 5)
- printf("%d is Wednesday", a);
- else if (a == 6)
- printf("%d is Thursday", a);
- else if (a == 7)
- printf("%d is Friday", a);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement