1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
serious [3.7K]
3 years ago
13

Design the logic for a program that allows a user to enter 20 numbers, then displays each number and its difference from the num

eric average of the numbers entered. Modify the program in Exercise 2a so that the user can enter any amount of numbers up to 20 until a sentinel value is entered.
Computers and Technology
1 answer:
Svetach [21]3 years ago
7 0

Answer:

Logic for a program

Explanation:

//Here ind = index

//declare the number

number ind

number sum

number avg

number SIZE = 20

number num[SIZE] = {0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0}

getReady()

while ind < SIZE

getNumbers()

stop

getReady()

ind = 0

sum = 0

return

getNumbers()

cout<< “Enter a number for position ”, ind

input numbers[ind]

sum = sum + numbers[ind]

ind = ind + 1

return ;

finishUp()

avg = sum/SIZE

ind = 0

while ind < SIZE

output numbers[ind], avg – numbers[index]

ind = ind + 1

return

Modify the program in 2a

number index

number sum

number avg

number actualSize

number SIZE = 10

number number[SIZE] = 0

You might be interested in
Evaluate if the following function is a good candidate to be placed in a library. Why or why not?
Anastaziya [24]

Answer:

No, this would not be a good candidate because it can't be used in creating new programs.

Explanation:

^

8 0
2 years ago
Read 2 more answers
Monica is teaching herself to paint. What web resource would be the most helpful
strojnjashka [21]

Answer:

Video Tutorial

Explanation:

The others don’t make sense.

3 0
3 years ago
Write an application that allows a user to enter the names and birth dates of up to 10 friends. Continue to prompt the user for
mylen [45]
Sorry I don’t know the answer I am really sorry
5 0
3 years ago
10^4+10-2=<br>10^4+10-2=
yaroslaw [1]
10008 is the answer to your question
4 0
3 years ago
Read 2 more answers
Which of the following is not one of the steps a company would take in an attempt to prevent a malfunction or failure of their p
bulgar [2K]

Answer:

A overdesign

Explanation:

7 0
3 years ago
Other questions:
  • Movies may depict larger-than-life situations, such as calamities, superheroes, and spaceships. A helps show such extraordinary
    11·1 answer
  • darren wants to substitute every occurence of the word bulky in his spreadsheet with the word strong. which of these options sho
    9·2 answers
  • 2. Who created the first photograph? How was this done?
    14·2 answers
  • How do you determine which type of operating system that best supports your computer or mobile device?
    5·1 answer
  • Why is distance learning better
    12·2 answers
  • You are planning a program to find the maximum heart rate recommended for patrons of a gym where you have a part-time job. One f
    13·1 answer
  • Modify the CountByFives application so that the user enters the value to count by. Start each new line after 10 values have been
    7·1 answer
  • What is the output?
    5·1 answer
  • HW2.24. Statement: Area of a Triangle The area of a triangle can be computed by knowing the base and height of the triangle usin
    11·1 answer
  • Explain how a stored procedure is processed by the DBMS query processor (including the type of return value after the query is p
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!