#include int dayamount(int month){ switch(month){ case 2: return 28; case 4: case 6: case 9: case 11: return 30; default: return 31; } } int main(){ int month; int count = 0; for(month = 0; month <13; ++month){ for(int i = 1; i < (dayamount(month)+1); ++i){ if(month == (i%10 + i/10)){ count++; } } } std::cout << count << std::endl; return 0; }