Uva 12577 Solution

#include<bits/stdc++.h>
using namespace std;

int main()
{
    string an;
    int i = 1;
    while(cin >> an)
    {
        if(an == "*")
            break;

        else if(an == "Hajj")
            cout << "Case " << i++ << ": " << "Hajj-e-Akbar" << endl;

        else if(an == "Umrah")
            cout << "Case " << i++ << ": " << "Hajj-e-Asghar" << endl;
    }

    return 0;
}

Comments