answer.
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
valina
3 months ago
6

6. Write pseudo code that will perform the following. a) Read in 5 separate numbers. b) Calculate the average of the five number

s. c) Find the smallest (minimum) and largest (maximum) of the five entered numbers. d) Write out the results found from steps b and c with a message describing what they are.
Computers and Technology
1 answer:
zubka84 [1K]3 months ago
8 0

Answer:

Pseudo CODE

a)

n= Input “Enter 5 integer values”

b)

sum=0.0

For loop with i ranging from 0 to 5

Inside loop sum=n[i]+sum

Outside loop avg=sum/5

Print avg

c)

small=n[0] # assume initial number is the smallest

large=n[0] # assume initial number is the largest

For loop with i ranging from 0 to 5

Inside loop if n[i]<small # check if current number is smaller than small

Inside if Then small=n[i]

Inside loop if n[i]>large # check if current number is larger than large

Inside if then large=n[i]

Print small

Print large

d)

print avg

print small

print large

You might be interested in
Which of the following describes ETL? a) A process that transforms information using a common set of enterprise definitions b) A
zubka84 [1067]

Answer:

The right choice is d) All of these options are accurate.

Explanation:

ETL refers to Extract, Transform, and Load. An ETL framework retrieves data from various sources, upholds standards for data quality and consistency, standardizes data so disparate sources can be integrated, and ultimately presents the data in formats suitable for application development and decision-making by end-users.

4 0
2 months ago
Which of the following statements are true about the growth of technology? Select 3 options. A. Individuals in the United States
oksian1 [950]
The answer is b. Explanation: The general population started accessing the internet following the advent of the World Wide Web.
4 0
1 month ago
Read 2 more answers
Chris accidentally steps on another student’s foot in the hallway. He apologizes, but the other student does not want to hear it
Rzqust [1037]

Answer:

He ought to report to a trusted adult and seek a resolution to the issue.

Explanation:

The situation could escalate and potentially involve others as well.

7 0
1 month ago
Read 2 more answers
Which two statements are true regarding the user exec mode? (choose two.)?
Natasha_Volkova [1026]
<span>To enter global configuration mode, you need to type the enable command.</span><span>
The prompt indicating this mode concludes with the ">" symbol.</span>
8 0
1 month ago
Write the state of the elements of each of the following arrays after each pass of the outermost loop of the selection sort algo
Natasha_Volkova [1026]

Answer:

Below is the explanation provided.

Elaboration:

In the first array => 8, 5, -9, 14, 0, -1, -7, 3.

  • 8, 5, -9, 14, 0, -1, -7, 3 For the first iteration, find the smallest from the first to the eighth and reposition the third element in the first place.
  • -9, 8, 5, 14, 0, -1, -7, 3 In the second round, identify the smallest from the second to eighth and adjust the penultimate element in the second slot.
  • -9, -7, 8, 5, 14, 0, -1, 3 For the third pass, find the least from third to eighth and move the second last item from that segment.
  • -9, -7, -1, 8, 5, 14, 0, 3 For the fourth pass, find the minimum from the fourth to eighth and shift the last second item from that section.
  • -9, -7, -1, 0, 8, 5, 14, 3 For the fifth pass, seek for the smallest from the fifth to eighth and place the last element from that portion.
  • -9, -7, -1, 0, 3, 8, 5, 14 For the sixth pass, identify the smallest from the sixth to eighth and shift the last second element from that group.
  • -9, -7, -1, 0, 3, 5, 8, 14 are in order now.

In the second array => 15, 56, 24, 5, 39, -4, 27, 10.

  • 15, 56, 24, 5, 39, -4, 27, 10 In the first iteration, identify the smallest item from the first to the eighth and reposition the last third item in that section.
  • -4, 15, 56, 24, 5, 39, 27, 10 In the second round, find the minimum item from second to eighth and interchange the last fourth item in that segment.
  • -4, 5, 15, 56, 24, 39, 27, 10 For the third pass, select the smallest from the third to eighth and shift the last item from that set.
  • -4, 5, 10, 15, 56, 24, 39, 27 For the fourth stage, determine the smallest from the fourth to eighth and do not shift its position as it is already sorted.
  • -4, 5, 10, 15, 56, 24, 39, 27 For the fifth iteration, check for the smallest from the fifth to the eighth and intersperse the last third item from that section.
  • -4, 5, 10, 15, 24, 56, 39, 27 For the sixth phase, find the smallest from the sixth to the eighth and exchange the last item in the sixth.
  • -4, 5, 10, 15, 24, 27, 56, 39 are in order now.
4 0
1 month ago
Other questions:
  • 9) If you are working on the part of 5-15 minutes, time-stamping (every 30 seconds) should start at: a) [00:05:00] b) [00:00:00]
    9·1 answer
  • When using the Python shell and code block, what triggers the interpreter to begin evaluating a block of code
    14·1 answer
  • 3.14 LAB: Input and formatted output: Caffeine levels A half-life is the amount of time it takes for a substance or entity to fa
    9·1 answer
  • Write a program that takes a date as input and outputs the date's season. The input is a string to represent the month and an in
    13·2 answers
  • In this code, identify the repeated pattern and replace it with a function called month_days, that receives the name of the mont
    14·1 answer
  • Edhesive 2.3 code practice question 1​
    11·1 answer
  • Write a loop that sets newScores to oldScores shifted once left, with element 0 copied to the end. Ex: If oldScores = {10, 20, 3
    15·1 answer
  • Write measurable performance objectives.Suppose that a trainer has identified as a generalgoal for a training module,"Able to fo
    13·1 answer
  • According to the book, if your CPU usage levels are greater than ________ during most of your work session, a faster CPU can gre
    6·1 answer
  • The Coins class was created to hold all your loose change, kind of like a piggy bank! For this exercise, you are going to simula
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!