hi,
i dont know how to solve it can you help me please???
Create a java program that will do the following:
• two input numbers each being a single digit (0…9)
• one character representing one of five operations : + (addition), - (subtraction), * (multiplication), / (division), and ^ (exponentiation)
b) output the description of the operation in plain English as well as the numeric results
Example1, if the two digits are 5 and 3 and the operation was * then the output should be
five multiplied by three is 15
Note, the result is given as a number, not a word.
Example2, if the two numbers are 2 and 9 and the operation is – then the output should be
two minus nine is -7
Hint: to perform the exponentiation, use the pow method of the Math class.
Example3, if the two numbers are 5 and 2, and the operation is ^, then the output should be
five to the power two is 25
Example4, if the two numbers are 5 and 9, and the operation is / then the output should be
five divided by nine is 0.55555556
For division, you cannot divide by 0, and you should therefore test whether the second number is 0; if it is then you should output a message saying you cannot divide by 0.
Example5, if the two numbers are 5 and 0, and the operation is / then the output should be
Division by zero is not allowed
Both input numbers must be single digits between0..9.
Example6, If the user enters 25 and 3 and the operation is + then the output should be
Invalid number; only single digits allowed.
and thanxx