- Write A C Program That Will Simulate A Calculator With Some Special Features As Follows Welcome Display A Message T 1 (93.35 KiB) Viewed 16 times
Write a C++ Program that will simulate a Calculator with some special features, as follows: Welcome: Display a message t
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Write a C++ Program that will simulate a Calculator with some special features, as follows: Welcome: Display a message t
Write a C++ Program that will simulate a Calculator with some special features, as follows: Welcome: Display a message to welcome the user (Arithmetic) - Calculator 1 (Arithmetic): Ask the user to input two numbers: First number (Float or double) First number (Float or double) Operation: deliver the output, based on the values & signs of the two numbers: o If both numbers are positive => return the sum If both numbers are negative => return the product o If one is positive and the other is negative => return the difference o If none of the above => return an error msg and tell user to restart program Goodbye: Display a Goodbye message and end Program Bonus Options Super Bonus (worth 2BPs) Write another C++ Program to simulate another feature of this Calculator, as follows: - Welcome: Display a message to welcome the user (Scientific) Calculator 2 (Scientific): Ask the user to input an angle o Angle (Float or double) Operation: based on the value of the angle, perform the following tasks: If angle is between 0 & 90 => return sine of the angle o If angle is between 90 & 180 => return cosine of the angle o If angle is between 180 & 270 => return tangent of the angle o If angle is between 270 & 360 => return angle in radians Goodbye: Display a Goodbye message and end Program More Bonuses (possible 3 more BPs) - Combine both calculators in a single program, give user the option to select a mode - Make sure your program is well written and is easy to read (comments/organization) Use any feature not discussed so far (functions, loops, etc.)