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 the largest of them. (Largest means most positive. So 5.1 is larger than 12.44.) The input and output should be exactly: 
Problem 1: (Maximum) 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 value is x For example, if the input is 4 -1.1 2.2 5.5 -99.0 the output should be 5.5 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. Hint. Use either a for or while loop
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
