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]
4 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]4 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
What are the differences and similarities of computer virus and biological virus. Give 4 examples
Papessa [141]

Answer:

During recent months, we’ve witnessed an unexpected and distressing pandemic of a coronavirus disease. What I find especially distressing about it is how the worldwide adversity was caused by just a tiny thing — namely, a virus called SARS-CoV-2.

However, biological viruses have always been a potent threat to humanity, as historic pandemics have proved. No wonder viruses became an ideal weapon model in a totally different world — a world of programming. The first computer viruses were created as early as in the 1970s. Starting as pranks, they evolved to become a major threat to the stability of computer networks worldwide. And the more I think of viruses, both biological and digital, the more amazed I am by their similarities.

We don’t know what kind of challenges viruses of either type will cause in the future, but understanding how they infect, the symptoms they induce, how they spread, and the damage they can cause can help us fight both.

The Common Thread

Let’s start with the basics: What does a virus look like?

computer virus of 1999

Click image for larger version

Figure 1: Pictured on the left is an electron microscope image of SARS-CoV-2 particles - the pandemic-causing coronavirus. Source: NIAID-RML. Pictured on the right is a code snippet of a Melissa, the notorious email-spreading computer virus of 1999. Source: Gizmodo.

The images in Figure 1 might look vastly different, but, essentially, they’re the same: a string of code. In the coronavirus, it’s the RNA genome in a shell; in Melissa, it’s computer code. In both cases, the code is an “instruction” for the virus to follow.

Explanation:

here is your answer hope you will enjoy

thank you

6 0
3 years ago
Why are people's visions of utopias and dystopias subjective?
Leno4ka [110]

Answer:

D. Because the technology needed for one person's utopia may be what creates disaster for another person's dystopia.

Explanation:

3 0
3 years ago
Match each definition with the term it describes. A(n) ______ provides identification and addressing information for computers a
earnstyle [38]

Answer:

IP address, LAN, WAN

Explanation:

6 0
3 years ago
Which degree is usually required for librarians who manage library holdings and assist patrons with book, periodical, and comput
IRISSAK [1]

i think C

help from Russia


6 0
3 years ago
Read 2 more answers
What threat do insiders with authorized access to information or information systems pose
ki77a [65]

Answer:

Depens on the permissions the user has been granted if the user leaks the infomation it will break the CIA triad rule. To be more specific it will break the confidentiality rule in the triad. If the user has the permission to delete data it will break the availability rule because the data is not avaliable as the user deleted the data. If the user has permissions to edit the data, it will break the integrity rule in the triad because the data is no longer reliable or trustworthy.

7 0
3 years ago
Other questions:
  • Which logic gate produces an output of 1 only if both it’s inputs are 0?
    10·2 answers
  • 4. The clutch pedal is found in cars with manual and automatic transmissions.
    6·1 answer
  • How to know if somebody else is listening my conversations by cellphone?
    13·1 answer
  • What online resource name does a major University end with
    7·2 answers
  • How to connect xbox one controller
    5·1 answer
  • When a cells number format is “time” it will show a value in what format
    5·1 answer
  • The process of recording and reporting the financial data for a business is known as:
    6·2 answers
  • Define stubs for the functions get_user_num() and compute_avg(). Each stub should print "FIXME: Finish function_name()" followed
    8·1 answer
  • A common hardware component found in electronic devices including desktop computers, laptops, tablets and smartphones. The amoun
    5·1 answer
  • A blueprint or a "print" needs to
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!