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: 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
Get step-by-step solutions from verified subject matter experts
