I'm only allowed to use certain basic concepts, which is why the code looks like it does.
The program is working, except after it computes the equation, I need the program to start all over. Do I have to include a loop?
Also: the way it's written now, when the answer is generated - it then automatically outputs "Cannot Initiate Calculator". This is only supposed to be Output if the user inputs a number outside of 1-4 (when selection an operation).
Here are my instructions
Instructions: prints a numbered menu of mathematical operations as shown below;
then prompts the user to select an operation;
then prompts and inputs the operands for the selected option (note that some operations require one and some two operands);
then computes and outputs the result.
The process repeats. The program should quit if the user inputs an option (number) that is not listed. The dialog should look as follows:
1. absolute value
2. square root
3. ceiling
4. power
Select an operation: 4
Enter base: 2
Enter exponent: 3
The result is: 8
Select an operation:
...
Can anyone advise me with repeating the program? Is there anyway to do this without writing a loop? I just want the program to start over (for the user) after it gives the answer.
I have posted example of relization of this:The process repeats. The program should quit if the user inputs an option (number) that is not listed. under (2)