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.