Computers and Technology

Create a program to determine the largest and smallest number out of 15 numbers entered (numbers entered one at a time). This should be done in a function using this prototype: double larger (double x, double y); Make sure you use a for loop expression inside your function. Enter 15 numbers 11 67 99 2 2 6 8 9 25 67 7 55 27 1 1 The largest number is 99 Hints: o Read the first number of the data set. Because this is the only number read to this point, you may assume that it is the largest number so far and call it max. o Read the second number and call it num. Now compare max and num, and store the larger number into max. Now max contains the larger of the first two numbers. o Read the third number. Compare it with max and store the larger number into max. o At this point, max contains the largest of the first three numbers. Read the next number, compare it with max, and store the larger into max. Repeat this process for each remaining number in the data set using a for expression.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 06:30, miguel3maroghi
This technology is used to produce high-quality documents that look good on the computer screen and in print. wiki presentation paint desktop publishing
Answers: 3
image
Computers and Technology, 23.06.2019 07:30, kimhoss2
What are ways to switch windows in excel? check all that apply. on the status bar, click the windows button, and then click the file name. on the task bar, click to display the excel jump list, and then click the file name. on the view tab, in the window group, click switch windows, and then click the file name. on the review tab, in the viewing group, click files, and then click the file name.
Answers: 1
image
Computers and Technology, 24.06.2019 03:30, etxchrissy
What is the purpose of a computer network needs assessment? to analyze which workers need more training to improve their performance to compare worker productivity to determine what steps employees can take to increase company revenue to evaluate how to move from the current status to the desired goal
Answers: 2
image
Computers and Technology, 24.06.2019 13:00, toshahoskins0098
What are some websites that you can read manga (ex: manga rock)
Answers: 1
Do you know the correct answer?
Create a program to determine the largest and smallest number out of 15 numbers entered (numbers ent...

Questions in other subjects:

Konu
Mathematics, 02.12.2021 02:10