assignment_21

assignment_21 - Switch.case statements Assignment 21 Write...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Switch..case statements Assignment 21 Write a simple calculator program. Ask the user if s/he wants to add ('+') subtract ('-'), multiply ('*') or divide ('/') and then ask for the number. Perform the operation with the given number. Start the "display" at zero. Stop when the user enters 'X' (for exit). See the screen shot below for a sample run. Use a switch..case statement to handle the user input (+,-,*,/,X). Use the assignment 20 program as a starting point. ...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online