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
FrozenT [24]
1 year 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:
Alex1 year ago
8 0

Answer:

Pseudo CODE

a)

n= Input “Enter 5 integer value”

b)

sum=0.0

For loop with i ranging from 0 - 5

Inside loop sum=n[i]+sum

Outside loop avg= sum/5

Print avg

c)

small=n[0] # assume the first number in the list is smallest

large= n[0] # assume the first number in the list is largest

For loop with i ranging from 0 - 5

Inside loop if n[i]<small #if any another number is smaller than small(variable)

Inside if Then small=n[i]

Inside loop if n[i]>large # if any another number is larger than large(variable)

Inside if then large=n[i]

Print small

Print large

d)

print avg

print small

print large

You might be interested in
Write a loop that reads strings from standard input, where the string is either duck or goose. the loop terminates when goose is
Misha Larkins [42]
Have in mind that the following code is ofr C++ but I know that whatever the language you are using, you can use the same idea:

<span><iostream> 
using namespace std; 
int main() 
{ 
int count=0; 
string x; 
while(1) 
{ 
cout<<"Enter either goose or duck"; 
cin>>x; 
if ( x=="Goose") break; 
count++; 
} 

cout<<"Number of Ducks="<<count<<endl; 
return 0; 
}
</span>
Another one that is simplier but the language is python is:
counter = 0while True:  line = input()if line == 'duck':  counter += 1    elif line == 'goose':breakprint(counter)
4 0
2 years ago
The word “computer” has become associated with anything related to screens and keyboard. However, these are not the only parts t
Digiron [165]

Explanation: The CPU is the main control chip which calculates what has to be done in order for your computer to function.

(Very interesting question you had. Hope this answer helps)

4 0
1 year ago
Arrays are described as immutable because they are two dimensional. are arranged sequentially. can be reordered. cannot be chang
Vlada [557]

Answer:

Arrays are described as immutable because they cannot be changed once they are defined.  (D on Edge)

Explanation:

It's in the notes and I just took the test (2020)

6 0
2 years ago
The major result of treating 1-butyne with 6M aqueous NaOH would be:_______.A. the production of an alkene.B. the production of
andriy [413]

Answer:

D. nothing, as the alkyne would not react to an appreciable extent.

Explanation:

Nothing, as the alkyne would not react to an appreciable extent.

6 0
1 year ago
Lance is at a bus station. His friend is using the ATM machine to withdraw some money. Lance notices a stranger deceptively watc
Blababa [14]

Answer:

The person watching Lances friend typing the ATM pin is an example of <u>"shoulder browsing"</u> and Lances friend should <u>"Change the ATM pin."</u>

<u />

<u>I hope this is the answer you were looking for!</u>

8 0
1 year ago
Read 2 more answers
Other questions:
  • Any software or program that comes in many forms and is designed to disrupt the normal operation of a computer by allowing an un
    13·1 answer
  • Manny is a personal trainer. He gives his client an endurance test each week. He would like to illustrate how much the client ha
    7·2 answers
  • Assume that name has been declared suitably for storing names (like "Misha", "Emily" and "Sofia") Write some code that reads a v
    10·1 answer
  • "online privacy alliance (opa) is an organization of companies dedicated to protecting online privacy. members of opa agree to c
    15·1 answer
  • You are the IT security administrator for a small corporate network. Samuel Garcia (sgarcia) has been away on vacation and has f
    9·1 answer
  • Choose the attribute used to provide accessibility by configuring a text alternative that is available to browsers and other use
    14·1 answer
  • Suppose two threads execute the following C code concurrently, accessing shared variables a, b, and c: Initialization int a = 4;
    15·1 answer
  • For a class project, Jerome builds a simple circuit with a battery and three light bulbs. On his way to school, Jerome drops his
    9·1 answer
  • 1. Assign to maxSum the max of (numA, numB) PLUS the max of (numY, numZ). Use just one statement. Hint: Call FindMax() twice in
    7·1 answer
  • Are bpos safe for organisations ? State your views on it
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!