CodePudding user response:
Input format is not clearCodePudding user response:
Tell me about the input formatCodePudding user response:
# include & lt; Iostream>using namespace std;
Int getWeekDay (int y, int m, int d) {
If (m==1 | | m==2) {
M +=12;
Y -;
}
Return (d + 2 * m + 3 * (m + 1)/5 + y + 4 - y/100 + y/y/400) % 7;
}
Int main () {
Int year;
While (cin & gt;> Year) {
Int I, flag=1;
For (I=1; I & lt;=12; I++) {
If (getWeekDay (year, I, 13)==4) {
If (flag==1)
Flag=0;
The else
Cout & lt; <"';
Cout & lt; }
}
Cout & lt;
return 0;
}
Is that so?