#include <iostream>
#include <cstdlib>
using namespace std;
int c ;
void add(int x, int y)
{
int a;
a = x + y;
cout <<"Answer is -> " << a << endl;
}
void negative(int x, int y)
{
int a;
a = x - y;
cout <<"Answer is -> " << a << endl;
}
void multiple(int x, int y)
{
int a;
a = x * y;
cout <<"Answer is -> " << a << endl;
}
void divide(int x, int y)
{
int a;
a = x / y;
cout <<"Answer is -> " << a << endl;
}
int main()
{
cout << "Welcome to the (add/minus/multiple/divide) simple calculator!" << endl;
cout << "Enter 1 if u want to add something.."<< endl;
cout << "Enter 2 if u want to minus something.."<< endl;
cout << "Enter 3 if u want to multiple something.."<< endl;
cout << "Enter 4 if u want to divide something.."<< endl;
cin >> c ;
while ( c > 0)
{
if ( c == 1 )
{
system("cls");
int x, y;
cout << "Insert your first number and second number!"<< endl;
cin >> x >> y;
add(x,y);
system("PAUSE");
}
else if ( c == 2 )
{
system("cls");
int x, y;
cout << "Insert your first number and second number!"<< endl;
cin >> x >> y;
negative(x,y);
system("PAUSE");
}
else if ( c == 3 )
{
system("cls");
int x, y;
cout << "Insert your first number and second number!"<< endl;
cin >> x >> y;
multiple(x,y);
system("PAUSE");
}
else if ( c == 4 )
{
system("cls");
int x, y;
cout << "Insert your first number and second number!"<< endl;
cin >> x >> y;
divide(x,y);
system("PAUSE");