Ето го и кода:
#include<iostream>
#include<windows.h>
using namespace std;
int main(void)
{
HANDLE h = GetStdHandle( STD_OUTPUT_HANDLE );
SetConsoleTextAttribute(h,FOREGROUND_GREEN | FOREGROUND_INTENSITY );
SetConsoleTitle("Advanced Calculator by teoo");
int a,b,c,r;
cout << endl;
cout << "-----------------------" << endl;
cout << " Izberete deistvie: " << endl;
cout << "-----------------------" << endl;
cout << endl;
cout << " 1 Sbor |" << endl;
cout << " 2 Razlika |" << endl;
cout << " 3 Proizvedenie |" << endl;
cout << " 4 Chastno |" << endl;
cout << endl;
cout << "-----------------------" << endl;
cout << " Moqt izbor e: ";
cin >> c;
cout << "n" << endl;
cout << " >>";
switch(c)
{
case 1:
cout << "n" << endl;
cout << " -------------------------" << endl;
cout << " Subirane na chisla" << endl;
cout << " -------------------------" << endl;
cout << endl;
cout << "Chislo 1: ";
cin >> a;
cout << "Chislo 2: ";
cin >> b;
r=a+b;
cout << endl;
cout << "Sborat e: ";
cout<<r<<endl;break;
case 2:
cout << "n" << endl;
cout << " -------------------------" << endl;
cout << " Izvajdane na chisla" << endl;
cout << " -------------------------" << endl;
cout << endl;
cout << "Chislo 1: ";
cin >> a;
cout << "Chislo 2: ";
cin >> b;
r=a-b;
cout << endl;
cout << "Razlikata e: ";
cout<<r<<endl;break;
case 3:
cout << "n" << endl;
cout << " -------------------------" << endl;
cout << " Umnojenie na chisla" << endl;
cout << " -------------------------" << endl;
cout << endl;
cout << "Chislo 1: ";
cin >> a;
cout << "Chislo 2: ";
cin >> b;
r=a*b;
cout << endl;
cout << "Proizvedenieto e: ";
cout<<r<<endl;break;
case 4:
cout << "n" << endl;
cout << " -------------------------" << endl;
cout << " Delenie na chisla" << endl;
cout << " -------------------------" << endl;
cout << endl;
cout << "Chislo 1: ";
cin >> a;
cout << "Chislo 2: ";
cin >> b;
r=a/b;
cout << endl;
cout << "Chastnoto e: ";
cout<<r<<endl;break;
default:
cout << endl;
cout << "---------------------------------------------" << endl;
cout << " >> Komandata ne e namerena v bazata danni" << endl;
Beep(900,1200);
return 0;
}
system("pause");
return 0;
}