Question: IN C++ QUESTION ONE (1) A program has been developed to define the largest number from a set of 10 numbers. The function larger is
IN C++
QUESTION ONE (1)
A program has been developed to define the largest number from a set of 10 numbers. The function larger is used to determine the largest number. The program will read the first number of the dataset has been assigned by the user. It will assume that the first number entered is the largest number and will store it in a variable called max. The program then will read the second number and store it in num. The system will compare max and num and store the larger number into max. Now max contains the larger of the first two numbers. The program will read the third number, compare it with max and store the larger number into max. At this point, max contains the largest of the first three numbers. The program then will read the next number, compare it with max, and store the larger into max. The program will repeat this process for each remaining number in the dataset. Eventually, max will contain the largest number in the data set.
Input data is:
15 20 7 8 28 21 43 12 35 3
The following questions based on the scenario above:
- Identify the best method to be used.
- Define an appropriate assigned data type for function larger
- Write declared identifiers to be used with appropriate comment for each
- Define the analysis requirements.
- Write an algorithm to solve the problem
F) Write a pseudocode
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
