initial commit
This commit is contained in:
12
C++/lesson2/task3.cpp
Normal file
12
C++/lesson2/task3.cpp
Normal file
@ -0,0 +1,12 @@
|
||||
#include <iostream>
|
||||
|
||||
int main() {
|
||||
const int days[]{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
|
||||
int month;
|
||||
std::cin >> month;
|
||||
if (month <= 0 || month > 12) {
|
||||
std::cout << "You are a bad person!\n";
|
||||
return 0;
|
||||
}
|
||||
std::cout << days[month - 1] << '\n';
|
||||
}
|
Reference in New Issue
Block a user