#include <iostream>
#include <stdio.h>
#include <cstdlib>
#include <conio.h>
#include<iomanip>
#include <math.h>
using namespace std;
long double x,y;
char wybor;
int main()
{
for(;;)
{
cout << "Podaj 1 liczbe: ";
cin >> x;
cout << "Podaj 2 liczbe: ";
cin >> y;
cout<<setprecision(100000);
cout<<endl;
cout << "MENU GLOWNE" << endl;
cout << "-----------------" << endl;
cout << "1. Dodawanie" << endl;
cout << "2. Odejmowanie" << endl;
cout << "3. Mnozenie" << endl;
cout << "4. Dzielenie" << endl;
cout << "5. Koniec programu" << endl;
cout << endl;
wybor=getch();
switch(wybor)
{
case '1':
cout<<"Suma = "<<x+y;
break;
case '2':
cout<<"Roznica = "<<x-y;
break;
case '3':
cout<<"Iloczyn = "<<x*y;
break;
case '4':
if (y==0) cout << "Nie dzielimy przez zero!";
else cout<<"Iloraz = "<<x/y;
break;
case '5':
exit(0);
break;
default: cout<<"Nie ma takiej opcji w menu!";
}
getchar();getchar();
system("cls");
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPGNzdGRsaWI+CiNpbmNsdWRlIDxjb25pby5oPgojaW5jbHVkZTxpb21hbmlwPgojaW5jbHVkZSA8bWF0aC5oPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmxvbmcgZG91YmxlICAgeCx5OwpjaGFyIHd5Ym9yOwoKaW50IG1haW4oKQp7Cgpmb3IoOzspCnsKCiAgICBjb3V0IDw8ICJQb2RhaiAxIGxpY3piZTogIjsKICAgIGNpbiA+PiB4OwogICAgY291dCA8PCAiUG9kYWogMiBsaWN6YmU6ICI7CiAgICBjaW4gPj4geTsKICAgICBjb3V0PDxzZXRwcmVjaXNpb24oMTAwMDAwKTsKCiAgICBjb3V0PDxlbmRsOwogICAgY291dCA8PCAiTUVOVSBHTE9XTkUiIDw8IGVuZGw7CiAgICBjb3V0IDw8ICItLS0tLS0tLS0tLS0tLS0tLSIgPDwgZW5kbDs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