Advertisement
Guest User

Untitled

a guest
Oct 17th, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int n;
  8. cin >> n;
  9.  
  10. int n_mod = n % 7;
  11.  
  12. if (n_mod == 1)
  13. cout << "MONDAY";
  14. else if (n_mod == 2)
  15. cout << "TUESDAY";
  16. else if (n_mod == 3)
  17. cout << "WEDNESDAY";
  18. else if (n_mod == 4)
  19. cout << "FRIDAY";
  20. else if (n_mod == 5)
  21. cout << "THURSDAY";
  22. else if (n_mod == 6)
  23. cout << "SATURDAY";
  24. else if (n_mod == 0)
  25. cout << "SUNDAY";
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement