Question
Write a well-documented complete C++ program that: Prompts the user to enter from the keyboard two numbers of type double for variables a and b.
Write a well-documented complete C++ program that:
Prompts the user to enter from the keyboard two numbers of type double for variables a and b. Calculates the value of c as follows: = 59 (+ 32) 3) Displays the entered values of a and b separated by tab at the beginning of a new line formatted to two decimal places.
The value of a = aa.aa The value of b = bb.bb
4) Displays the calculated value of c at the beginning of the next line formatted to two decimal places.
The result is c = cc.cc
Sample runs
Enter the value of a = 5.0
Enter the value of b = 9.0
The value of a =5.00 The value of b =9.00
The value of c =20.00
Enter the value of a = 12.3
Enter the value of b = 4.4
The value of a =12.30 The value of b =4.40
The value of c =13.39
This is the output must be
The value of c =20.00 Enter the value of a = 5.0 Enter the value of b = 9.0 The value of a =5.00 The value of b =9.00 The value of c =20.00 Enter the value of a = 12.3 Enter the value of b = 4.4 The value of a = 12.30 The value of b =4.40 The value of c =13.39 Enter the value of a = 12.3 Enter the value of b = 4.4 The value of a =12.30 The value of b =4.40 The value of c=13.39
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started