Simple Calculator using switch statement

Today we are programming a simple calculator program which can perform addition, subtraction, multiplication and division. This question was asked by my friend in microsoft interview. Looks simple but very important.

Below is the program.

Enter the numeric value: 8
Enter the numeric value: 4
Choose from + , – , * , /: +
The numbers are : 8 and 4 option choose is +
The result is 12.0

Leave a Reply

Your email address will not be published. Required fields are marked *