Advertisement
Guest User

Untitled

a guest
Oct 6th, 2015
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int time;
  6. printf("What time is it now?\n");
  7. scanf("%d", &time);
  8. printf("%d\n",time);
  9.  
  10.  
  11. if (time < 6)
  12. {
  13. printf("Good night!");
  14. }
  15. else if (time < 12)
  16. {
  17. printf("Good moring!");
  18. }
  19. else if (time < 18 )
  20. {
  21. printf("Good afternoon!");
  22. }
  23. else
  24. {
  25. printf("Good evening!");
  26. }
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement