Question: Write a C++ program that first prompts the user to enter a positive integer, n, and then prompts for and reads in exactly n floating

Write a C++ program that first prompts the user to enter a positive integer, n, and then prompts for and reads in exactly n floating point numbers and determines and displays the sum of the numbers entered and the maximum number entered.

Note: The floating point numbers entered can be any valid floating point numbers.

Here is an output example from running the program (user input is in bold):

Enter positive number: 4

Enter float 1: 1.1

Enter float 2: 8.8

Enter float 3: 3.3

Enter float 4: 6.6

Sum = 19.8

Maximum = 8.8

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!