calculator

I need assistance in this project. its due tonight.!!




Your calculator program should now display a menu like this:

Choose a calculator:

1) Standard

2) Scientific

3) Trigonometric

Choice: __

If the user selects standard by entering 1, you will show a message:

Please enter your calculation is the following format a+b, For example if you want to add 5 and 2 together, you type 5+2:

So now your user can enter their calculations. You will use cin statements to read one float, one char and one float (in this order). Then you will use a switch case statement that uses the char variable to decide which operation to perform. So for example:

switch(op)

{

case '+':

cout << a+b << endl;

break;

case '-': ....

}


If your user chooses the scientific calculator, your program will show another menu such as :

1) log

2) sqrt

3) power

Depending on the operation, you will ask the user to enter the correct set of variables. For example, for power you need a number and a power, for sqrt you only need 1 number. You can use if-elseif-else for the scientific calculator


If your user chooses the trigonometric calculator, your program will first ask if the values are in degree or radians. C++ functions expect radians as input. Therefore, if your user selects degrees, you will take the input and convert to radians before calculating the results. In either case, the program should show a menu such as :

1) sine

2) cosine

3) tan


Choice:

Once you have all the information, you can proceed to do the calculations and output results.
You better begin to code, then. This is not a free homework site. What specific assistance do you need?

Take a look at the link below:

http://www.cplusplus.com/forum/articles/40071/#msg218019

i need assistance on how to start it.

#include <math.h>


#include <iostream>


using namespace std;
int main ()


{ cout << "Choose a calculator " << endl;


cout << " 1 for standard ";


cout << " 2 for scientific ";


cout << " 3 for trignometric ";



is this beginning correct?
Do you have a way for the user to enter in their choice? Then I would try using a switch statement to handle the different cases
Topic archived. No new replies allowed.