Q5. Design a C++ program that simulates a simple calculator using switch structure. Program will take two integer numbers as input and an operation as a character '+', '', **, "%', '"'. It will then...


Q5. Design a C++ program that simulates a simple calculator using switch structure.<br>Program will take two integer numbers as input and an operation as a character '+', '',<br>**,

Extracted text: Q5. Design a C++ program that simulates a simple calculator using switch structure. Program will take two integer numbers as input and an operation as a character '+', '', **, "%', '"'. It will then perform that operation on both numbers and print the result. 1. For division avoid division by zero and should output the result in floating point, for example if n1= 5 and n2= 2 then it should print 2.5. (use typecasting for conversion) 2. If user enters 'P' print Power of two numbers. (use cmath pow function) 3. If user enters 'S' print square root of both numbers (use cmath sqrt function)

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here