Logic
-
[C/C++] 백준 1924번 2007년Logic/백준 2019. 1. 2. 18:01
#include #include using namespace std; class C_date { public: int x, y; int temp; int month[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 }; string date[7] = { "SUN","MON", "TUE", "WED", "THU", "FRI", "SAT" }; void FindDate(){ cin >> x >> y; temp = 0; for (int i = 0; i < x; i++) { y += month[i - 1]; } temp = y % 7; } void PrintDate(){ switch (temp) { case 0: cout