Show how many days a month has: long months 31, short months 30, and February counted as 28. The 31-day months and February are written — add the 30-day ones: 4, 6, 9 and 11. This month is 4.
30
#include <iostream>
using namespace std;
int main() {
int month = 4;
switch (month) {
case 1: case 3: case 5: case 7: case 8: case 10: case 12:
cout << 31 << endl;
break;
// your code here: show 30 for months 4, 6, 9 and 11
case 2:
cout << 28 << endl;
break;
}
return 0;
}
Run tries the examples. When they look right, Submit.