Code:
#include <iostream>
using namespace std;
int main()
{
char type_of_calculation;
cout << "Calculator:" << endl;
cout << "Enter A for addition of two numbers, D for divison of two numbers: ";
cin >> type_of_calculation;
switch (type_of_calculation)
{
case 'a':
case 'A':
double value1, value2;
cout << "Enter the first of two numbers to add: ";
cin >> value1;
cout <<"second number: ";
cin >> value2;
cout << endl << value1 << " + " << value2 << " = " << (value1 + value2) << endl;
//Or however/whatever you wanted to do.
break;
case 'd':
case 'D':
double dividend, divisor;
cout << "Enter the dividend: ";
cin >> dividend;
cout <<"now the divisor: ";
cin >> divisor;
cout << endl << dividend << " / " << divisor << " = " << (dividend / divisor) << endl;
//Or however/whatever you wanted to do.
break;
}
system("pause");
return 0;
}
That should get you started....
Payment for services rendered is next time you want help and ask a question take a little more time writing it and use capitalization and punctuation please!