Question: Write a program that reads in n floating-point numbers and prints the largest of them. (Largest means most positive. So 5.1 is larger than -12.44.)

 Write a program that reads in n floating-point numbers and prints

Write a program that reads in n floating-point numbers and prints the largest of them. (Largest means most positive. So 5.1 is larger than -12.44.) The input and output should be exactly: How many numbers do you have? [USER ENTERS A POSITIVE INTEGER] Input number (count 1): [USER ENTERS A DECIMAL NUMBER] Input number (count 2): [USER ENTERS A DECIMAL NUMBER] Input number (count X): [USER ENTERS A DECIMAL NUMBER] The maximum is X. Assume the first input is indeed a positive integer. You may not use any libraries aside from iostream and string. Name your file my_max.cpp

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!