example: you have a calculator and the the user did the operation he want but he want to do another operation with the last result that he did before????

second: how to make exception if the user doesnt enter a number and enter a char or anything other..so if he does that...i want to print a message that he made an error????