//////////////////////////////////////
//      Kalkulator by Holdysz       //
// Ostatnia modyfikacja: 08.05.2010 //
//////////////////////////////////////

#include <iostream>
using namespace std;

int main()
{
   char  cmd = 0;
   int   x, y;
   
   cout << "Kalkulator by  Mateusz 'Holdysz' Hladasz 1.3 \n\n\n"
        << "Menu glowne: \n\n"
        << "\t (a) - Dodawanie \n"
        << "\t (b) - Odejmowanie\n"
        << "\t (q) - Wyjscie";
        
   // Glowne dzialanie programu
   
   while( cmd != 'q' )
   {
       cout << "\n\nWybierz: ";
       cin >> cmd;

       switch (cmd)
       {
           case 'a':
               cout << "\nPierwsza liczba: ";
               cin >> x;
               cout << "Druga liczba: ";
               cin >> y;
               cout << "\nWynik: "<< x + y;
               break;

           case 'b':
               cout << "\nPierwsza liczba: ";
               cin >> x;
               cout << "Druga liczba: ";
               cin >> y;
               cout << "\nWynik: "<< x - y;
               break;

           default:
               cout<<"Zle wybrales!"<< std::endl;
       }
   }

   return 0;
}