This calculator starts operation with showing output "Enter a Number" and afterwards, it asks for a mathematical symbol and if user doesn't input any valid mathematical symbols, it will show "Invalid Input" and ask for a valid mathematical symbol. After this, it takes input of another number and performs the mathematical operation and shows output.
The variables are taken as double so that we can input any kind of numbers.Â