write a program that uses a witch statement to create a menu for a calculating machine. the program will demonstrate the option that you take and ask you to enter a value and then perform the operation. display a running total before you perform the next task. the calculating machine only supports adding,subtracting and multiplying . you will have the program quite when you enter a pound sign '#'. when you enter a 'Q' call a function that displays the message " tahnk you for using our calculator!"
I used the do-while loop in the void function. It's a chained loop.
Everything I put between do and while will be executed atleast once.
Example:
do{
cout << "Hello, world!" << endl;
}while( 1 < 2);
This is an infinite loop because there is no update expression and 1 < 2 is a true expression
Anyways, read the book: "C++ Primer 5th edition". It helped me ALOT, and answered all the questions I had. I am currently still reading it, I am at page 300.
But beware, it's a 1200 page book. Still, I highly recommend reading it if you want to know the syntax of C++ thoroughly.