Question: Write a complete C++ program that: 1) Prompts the user to enter from the keyboard two numbers of type float and store them in

Write a complete C++ program that: 1) Prompts the user to enter from the keyboard two numbers of type float

Write a complete C++ program that: 1) Prompts the user to enter from the keyboard two numbers of type float and store them in the variables xand 2) Calculates the value of as follows: Shema x + y 3) At the beginning of a new line, displays the entered values of randy. Each is located in a field of 9 positions with 2 digits to the right of the point. The unused positions in the fields MUST be filled with "*. The values are separated by a tab. 4) Displays the value off at the beginning of the next line in a field of 10 positions with 3 digits to the right of the point. The unused positions in the fields MUST be filled with spaces. You program MUST display the results exactly as shown in the sample runs below. Two sample runs: Enter two numbers of type float please: 12.456 4.897 X = ****12.46 y *****4.90 The result = S 1.771 Enter two numbers of type float please: 3.75 20.79 X = *****3.75 y ****20.79 The result = -1.240

Step by Step Solution

3.43 Rating (159 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

include using namespace std int main Declare two floatingpoint variables float x ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!