Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
1.2 kB
2
Indexable
Never
#include <iostream>
using namespace std;
int main()
{
    int a;
    string b[6] = { "Russki", "Matesha", "Gulat", "Ebat avets", "Izbit uzbeka","Spat"};
    cin >> a;
    switch (a) 
    {
    case 1: 
        for (int i = 1; i < 3; i++)
        {
            cout << i << ": " << b[i - 1] << endl;
        }
        break;
    case 2:
        for (int i = 3; i < 6; i++)
        {
            cout << i-2 << ": " << b[i] << endl;
        }
        break;
    case 3:
        for (int i = 1; i < 3; i++)
        {
            cout << i << ": " << b[i - 1] << endl;
        }
        break;
    case 4:
        for (int i = 5; i < 6; i++)
        {
            cout << i - 4 << ": " << b[i - 1] << endl;
        }
        break;
    case 5:
        for (int i = 1; i < 6; i++)
        {
            cout << i << ": " << b[i - 1] << endl;
        }
        break;
    case 6:
        for (int i = 6; i < 7; i++)
        {
            cout << i-5 << ": " << b[i - 1] << endl;
        }
        break;
    case 7:
        for (int i = 1; i < 7; i++)
        {
            cout << i << ": " << b[i - 1] << endl;
        }
        break;


        

    }
}