Page 6 - Introduction to Computer Science
P. 6

  Lab9
You will create a program that will act like a calculator. You will allow the user to input a number, then an operator (operators are + – * / % ^ ), then another number and print out the result.
You must use a switch to determine which operator was entered. Print error if it was not a valid option. You must comment the switch statement.
^ means exponents 5^2 = 52 = 25
The ___ represents a number
Example 1:
Enter a number: ___ Enter an operator: ___ Enter a number: ___ ___ ___ ___ = ___
    



























































































   4   5   6   7   8