a guest Aug 22nd, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- In this project, you are going to be creating a simple calculator that will only operate on positive numbers. Your program has already been set up to take in a single line of input formatted as a String, without spaces. You may assume that the input is guaranteed to be valid. The output should be something like "The result is ____".
- Your result must be printed as an integer.
- Your program should be able to handle the following operators:
- You may find a new String method, .contains(), to be helpful.
- returns: true if the char/String is found in the original String, false otherwise
- You can use the following to convert Strings to ints (assuming they can be converted):
- Sample input/output:
- The result is 31
- The result is 3
- In: 65
- The result is 32
RAW Paste Data