Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- int main()
- {
- const int monthSize{ 12 };
- int days[monthSize]{ 31,28,31,30,31,30,31,31,30,31,30,31 };
- int month;
- std::cout << "Enter month number: ";
- std::cin >> month;
- std::cout << "In month number " << month << " there are " << days[month - 1] << " days\n";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment