Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int time;
- printf("What time is it now?\n");
- scanf("%d", &time);
- printf("%d\n",time);
- if (time < 6)
- {
- printf("Good night!");
- }
- else if (time < 12)
- {
- printf("Good moring!");
- }
- else if (time < 18 )
- {
- printf("Good afternoon!");
- }
- else
- {
- printf("Good evening!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement