Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
550 B
2
Indexable
Never
//домашка про времена года
#include <iostream>
using namespace std;
int main()
{
    int a;
    cin >> a;
    if (a > 0 && a <= 2)
    {
        cout << "Winter.";
    }
    if (a > 2 && a <= 5)
    {
        cout << "Spring.";
    }
    if (a > 5 && a <= 8)
    {
        cout << "Summer.";
    }
    if (a > 8 && a <= 11)
    {
        cout << "Autumn.";
    }
    if (a == 12)
    {
        cout << "Winter.";
    }
    if (a <= 0 or a> 12)
    {
        cout << "Error!";
    }
    return 0;
}