6. Write pseudo code that will perform the following. a) Read in 5 separate numbers. b) Calculate the average of the five numbers. 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.

Answers

Answer 1

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

Answer 2

Pseudocodes are used as a prototype of an actual program.

The pseudocode is as follows:

input n1, n2, n3, n4, n5

avg = (n1 + n2 + n3 + n4 + n5)/5

small = n1

large = n1

for i = 2 to 5:

   if n1 > ni then:

       small = ni

   if n1 < ni: then:

       large = ni

print("Average:", avg)

print("Smallest:", small)

print("Largest:", large)

The pseudocode starts by getting inputs for the 5 valuesNext, the average of the 5 values is calculatedThe fourth line iterates through the numbersWithin the iteration, there are 2 conditional statements that calculate the smallest and the largest valuesThe last three lines print the average, the smallest and the largest input

Read more about pseudocodes at:

https://brainly.com/question/24735155


Related Questions

People convicted of cyberbullying in most states
face no punishment for their actions.
face varying degrees of punishment.
are taught how to use technology positively.
are forced to do community service.

Answers

Answer: The Answer is B. face varying degrees of punishment.

Hope this helps! ^^ (also i know this is the right answer because i got it correct)

Answer:

b

Explanation: the punishment depends on the severeness , so we dont know the exact punishment

Choose the two statements that best describe the relationship between HTTP and the World Wide Web

Answers

Answer:

(I) and (III)  statements that best describe the relationship between HTTP and the World Wide Web.

Explanation:

Given that,

The following statements that is describe the relationship between HTTP and the World Wide Web

(I). HTTP and WWW are used in website.

(II).  World Wide Web are not interlinked by hypertext.

(III). WWW is the system of connected hypertext documents that can be viewed on web browsers.

We know that,

HTTP :

The full form of HTTP is Hypertext Transfer Protocol . A protocol  which permits the getting of plans it is called HTTP.

For example : HTML documents.

It is an application of a protocol where any data exchange on the Web.

It is a protocol of online communication and data transfer one system to another system.

WWW :

The full form of WWW is world wide web. It is used as a web which is information systems where documents and other web methods are checked by uniform resource locators, which may be interlinked by hypertext.

It is a collection of webpages.

Hence, (I) and (III)  statements that best describe the relationship between HTTP and the World Wide Web.

What are language standards? At this point in your study of programming, what do they mean to
you?

Answers

In computing, a programming language specification (or standard or definition) is a documentation artifact that defines a programming language so that users and implementors can agree on what programs in that language mean.

What is meant by computer generation?​

Answers

Answer:

The development of computer took place into 5 phases which is known as generation of computer.

Explanation:

From first generation computer till now, development of computer took place in 5 distinct which is also know as generation of computer.

Answer


Generation in computer terminology is a change in technology a computer is/was being used. Initially, the generation term was used to distinguish between varying hardware technologies. Nowadays, generation includes both hardware and software, which together make up an entire computer system.

Create a Boolean function odd_number_digits(n) that returns True when a positive integer has an odd number of digits. (You may assume that I will not use a number greater than 1,000,000.) Then, use it to make a
function sum_odd_digits(n) that sums all the numbers from 0 to n that have an odd number of digits.

Answers

Answer:

Following are the code to this question:

import java.util.*;//import package for user input

public class Main//defining class main

{

   public static boolean odd_number_digits(int n)//defining boolean method odd_number_digits

   {

       if(n>0 && n%2!=0)//defining if block that check value is positive and odd number

       {

       return true;//return value true

       }

       else//defining else block

       {

           return false;//return false value

       }

   }

   public static void  sum_odd_digits(int n)//defining a method sum_odd_digits

   {

       int sum=0,i;//defining integer variable

       for(i=0;i<=n;i++)//defining for loop

       {

           if(i%2!=0)//defining if block for odd number

           {

               sum=sum+i;//add odd number

           }

       }

      System.out.print(sum);//use print method to print sum value

   }

public static void main(String[] args) //defining main method

   {

       Scanner ox=new Scanner(System.in);//creating Scanner object

       int n= ox.nextInt();//defining integer variable for input value

       System.out.print(odd_number_digits(n)+ "\n");//use print method to call method

       System.out.println("Sum of odd numbers: ");//print message

       sum_odd_digits(n);//calling method

   }

}

Output:

please find the attachment.

Explanation:

In the above code, two methods "odd_number_digits and sum_odd_digits" are defined in which the first method return type is boolean because it will true or false value, and the second method returns the sum of odd numbers.

In the "odd_number_digits" method,  an integer variable passes as an argument and inside the method, if block is used that check value is a positive and odd number then it will return a true value.

In the "sum_odd_digits" method, it accepts an integer parameter "n", and define integer variable "sum" inside the method, which uses the for loop, inside the loop if block is used that counts odd numbers and adds its in sum and print its value.

Why is it unlawful for an employer to refuse to employ someone based solely on their gender without evidence that such a characteristic is necessary for successful completion of the job? Answer by writing a paragraph of two to three sentences.

Answers

Employing someone based on gender is unlawful because, it is the skill which matters to get the required job done and skills are not based on gender. There is no evidence that this particular gender cannot do this job and this particular gender can do. Everyone who posses the required skillsets are eligible to get employed irrespective of gender.

===============================================

I tried my best

You’ve been given a new cell phone with a 2 gigabyte data plan. You plan to use your phone for text messages, images, video, and music. Which of these categories are best compressed using lossless compression? Which of these categories are best compressed using lossy compression? Why?

Answers

Answer:

texts and music are best compressed using lossy compression and videos are best compressed using lossless compression

Explanation: texts and music are best compressed using lossy compression because there are not many details to leave out while pictures and videos are best compressed using lossless compression because they need to be in good quality

Lossy compression should be applied to text messages and music while lossless compression should be applied to images and videos

A lossy compression of a file implies that the quality of the file is reduced in order to get the file compressed.

This type of compression can be applied to text messages and music because a reduction in the size and quality will only reduce few details about the text messages and music file.

However, a lossless compression is such that even after the file size is reduced, the quality remains unchanged. This type of compression can be applied to video and pictures because even if the size is reduced, the quality of the files are not expected to change.

Hence;

Lossy compression should be applied to text messages and musicLossless compression should be applied to images and videos

Read more about file compressions at:

https://brainly.com/question/13663721

In an inspection, usually the first thing an inspector will want to see is:

Answers

Answer:

Your records and paperwork

Your paperwork, your skills, and your background/ record.

Sorry if this is not related.


What is the best game programming language to learn?

Answers

These are my recommendations but you should just try to find the one that’s right for you ——
Python for beginners.
C++ for game development. (C# for unity game development )
html5 for web development.
Java or JavaScript for software development
I suggest you to try either Visual Studio, Python or Java and JavaScript.
Python and Java are comparingly easy.

What is 10X Profit Sites?

Answers

Answer:

Wow! That's amazing!

Explanation:

Choose all of the items that represent functions of the operating system kernel.

memory management

process management

user interface

system input and output (I/O) management

file creation and management

Answers

Answer:

A. memory management

B. process management

D. system input and output (I/O) management

E. file creation and management

Answer:

1,2,4,5

Explanation:

E2020 - Intro to Information Technology

A DBMS commonly receives data update requests from application programs.A. TrueB. False

Answers

Answer:

A. True

Explanation:

DBMS is an acronym for database management system and it can be defined as a collection of software applications that typically enables computer users to create, store, modify, retrieve and manage data or informations in a database. Generally, it allows computer users to efficiently retrieve and manage their data with an appropriate level of security.

Some examples of a database management system (DBMS) are RDBMS, Oracle, SQL server, PostgreSQL, dBASE, Clipper, MySQL, Microsoft Access, etc.

A DBMS commonly receives data update requests from application programs through the Open Database Connectivity ( ODBC ) driver in case of communication with other database management softwares.

Basically, when a database management system (DBMS) receives data update requests from application programs, it simply instructs the operating system installed on a server to provide the requested data or informations.

10010010 + 01100010 =

The problem above is called an _________. It means that there are more ________ than can be stored in a byte, or eight bit number.

Answers

Answer:

1. binary number or 8 bit

2. bits

Explanation:

Write a Java program that prompts the user for an int n. You can assume that 1 ≤ n ≤ 9. Your program should use embedded for loops that produce the following output: 1 2 1 3 2 1 4 3 2 1 5 4 3 2 1 . . . n . . . 5 4 3 2 1 Your prompt to the user should be: Please enter a number 1...9 : Please note that your class should be named PatternTwo.

Answers

Answer:

Here is the JAVA program:

import java.util.Scanner;  // to take input from user

public class PatternTwo{   //class name

public static void main(String args[]){  //start of main function

Scanner scan = new Scanner(System.in);   // creates Scanner class object

System.out.print("Please enter a number: ");  //prompts user to enter an int n for the number of rows

int n = scan.nextInt();   //reads and scans the value of n from user

int i, j;   //declares two variables to iterate through i  rows and j columns

for (i=1; i<=n; i++){    //outer loop for rows  

for (j=2*(n-i); j>=1; j--){   //inner loop for space between numbers in pattern  

System.out.print(" ");  }   //displays an empty space in the pattern

for (j = i; j >= 1; j--)  { //inner loop for columns  

System.out.print(j+" "); }   //prints the value of j (prints numbers in reverse)

System.out.println();   }   }   }  //prints a new line after printing each row

Explanation:

The program is explained with an example in the attached document.

Help me for this question

Answers

Answer:

Answer C

Explanation:

You are welcome

Explain why decomposition will be used in creating the algorithm for the game including two dice.

Answers

I saw this question while reviewing the notes in class

Match each task with the features necessary to complete the task

Answers

Is there supposed to be an image?

which of the following is involved in ordering an outline. A.grouping B.merging C.organizing D.arranging

Answers

Answer:

The answer is A.GROUPING

HOPE THIS HELPS...

Answer:

nice name

Explanation:

Property Tax

Madison County collects property taxes on the assessed value of property, which is 60 percent of its actual value. For example, if a house is valued at $158,000, its assessed value is $94,800. This is the amount the homeowner pays tax on. At last year's tax rate of $2.64 for each $100 of assessedvalue, the annual property tax for this house would be $2502.72.

Write a program that asks the user to input the actual value of a piece of property and the current tax rate for each $100 of assessed value. The program should then calculate and report how much annual property tax the homeowner will be charged for this property.

Answers

Answer:

sorry i really dont know

Explanation:

Answer:

Here is the C++ program

====================================================

#include <iostream>

#include <iomanip>

using namespace std;

int main(){

const double ASSESS_VALUE_WEIGHT = 0.60;

double houseValue, assessedValue, taxRate, tax;

cout<<"Enter the actual value of property: ";

cin >> houseValue;

cout<<"Enter the current tax rate for every $100: ";

cin >> taxRate;

assessedValue = houseValue * ASSESS_VALUE_WEIGHT;

tax = assessedValue * taxRate / 100;

cout<<setprecision(2)<<fixed<<showpoint;

cout<<"Annual property tax: $ " << tax;

return 0;

}

Explanation:

Help meeeee - Improved Pet App


Try out the improved version of the pet app that gives the user information about pet stores close by, which uses new sources of input. Determine the information that the app gets from each source of input.


User


Phone Sensors


Internet








Answers

Answer:

Did you do it? Can you give me the answers please‍♀️

Explanation:

Pleaseeeeeeeeeeeeeeeeeeeeeeeeeeeee

What is the difference between an IP address and an IP Packet?

Answers

Answer:

The IP address is a numerical number assigned to a device when connected to the internet for better identification. Whereas, the IP packet is the packet which contains the total information of the content that is carried over the network from host to destination and vice versa.

Explanation:

I hope this helped and plz give brainliest!

Which color reflects more light red blue black or white

Answers

White black absorbs the light

The next four octal numbers after 36 is:________.
a. 36, 37, 40, 41
b. 37, 40, 41, 42
d. 36, 37, 38, 39
c. none of the Above

Answers

Answer: b. 37, 40, 41, 42

Explanation:

The next four octal numbers after 36 is 37, 40, 41, 42.

The octal numeral system, which is also referred to as "oct" for short, is simply base-8 number system.

It is a number system whereby only digits from 0 to 7 are used and there are no letters or numbers that are above 8 that are used.

In this case, after 36, the next number will be 37 after which we go to 40 as we can't write 38 in the octal system. Therefore, the next four octal numbers after 36 is 37, 40, 41, 42.

What is the Internet address of the speech you listed to?

Answers

Answer:

To get the address of a website page, check the URL address at the top of the browser window.

Explanation:

The internet is global interconnection of multiple networks. All devices in the network must have a web address to communicate in the network. The IP version 4 and 6 are two concepts of addressing devices on the internet. The DHCP and DNS internet protocols are used to assign address and map addresses to string-like URLs respectively.

How do you begin typing in a table cell?

A. Click within a cell and begin typing.

B. Highlight the table and begin typing.

C. Click on the Convert to Text button in the Layout ribbon.

D. Right-click and select Text Direction.

Answers

Its Option A - Click Within a Cell and begin typing.
Thank you!

To begin typing in a table cell, click within a cell and begin typing. The correct option is A.

What is a table cell?

A table cell is a subset of a chart table that is used to store information or data. Cells are organized both horizontally and vertically.

Each cell contains information about the combination of row and column headings with which it is collinear.

Text, numbers, and a variety of other elements can be included in table cells. Tables were originally used only to display numbers, but they are now useful for a wide variety of tasks.

To begin typing text into a cell, simply select a cell and start typing. To select text that is already inside a cell, place the insertion point within the cell.

In either mode, you can use the arrow keys to navigate around the table, making it simple to enter text into any cell.

Thus, the correct option is A.

For more details regarding a table cell, visit:

https://brainly.com/question/8059827

#SPJ5

When following maintenance procedures, it is important to carefully read the procedures and to complete
each step before moving to the next step.
True or
False

Answers

True, is the way to go

what is the color of red?

Answers

Answer:

red

Explanation:

orange and red

Answer: Red

Explanation: The reason why it's red is because of how we see colors through our eyes.

why is makyra a loser??​

Answers

Because she doesn’t have any friends :-(

Answer:

She dumbbbbbbbbbbbbbbbbbbbbbb

Explanation: Her mom watched too much spongebob while pregnant

Assignment 1 silly sentences

Answers

Answer:

Sally sells sea shells by the sea shore

Explanation:

19 POINTS! What does the icon for changing the color of a cell or range look like? (Excel)


a pencil


the letter A


a paint bucket


a paintbrush

Answers

Answer:

Paintbucket

Explanation:

I got it right

Answer:

A Paint Bucket

Explanation:

Other Questions
what is a hollow, muscular organ that pumps blood throughout the body. a principal square root is always... why is there more texas cities located in the eastern part of the state ? !!!! I NEED HELP RIGHT NOW ITS DUE IM 5 MINUTES !!!! Please does anyone know how to do this x (-12) +7whats the answer A.-11B.-17C.4D.-5E.8 When offering supporting material in a speech, the speaker should ensure that:_________. I REALLY NEED HELPPPPPP PLEASEEEE!!!!!!These three questions are about Baking, Pastry, etc..1. Give an example of a situation in which a home cook would need to scale a recipe.2. Why is so important that scaling be done correctly? What can happen if it is not?3. Why do you think that some kitchen equipment does not need to be sanitized? Give an example of a piece of equipment that would not need sanitizing. A school installs a ramp that will rest on a landing 2 feet high. The ramp is 24 feet long. According to building code, the ramp must not be greater than a 5 angle with the ground. What is the angle formed from the ground? Is the school in compliance with the building code? Group of answer choices 85degree; no3degree; yes5degree; yes8degree; no Should the painter use stencil one or stencil two for her project? Why? Explain in terms of rigid transformations. Aqueous hydrochloric acid HCl will react with solid sodium hydroxide NaOH to produce aqueous sodium chloride NaCl and liquid water H2O. Suppose 9.84 g of hydrochloric acid is mixed with 3.1 g of sodium hydroxide. Calculate the maximum mass of water that could be produced by the chemical reaction. Round your answer to 2 significant digits. How did the Indian Ocean trade impact East Africa? 8=3/2(9x-6) and explain is -4 greater or lesser than 0 LM is 11x-21 MN is 8x+15 The icy, bitter night seemed to disappear as Sally curled up next to the warm, crackling fire. What figurative language? The BuildingLeslie was walking slower than a drowsy turtle. He was trying to catch up to Eric's hasty footsteps. Leslie didn't care that hisglasses would slide down his nose every so often. His eyes were keenly focused on an open book balanced on his righthand. From time to time, Eric had to pull Leslie away from the traffic. Eric carried a basketball and bounced it on theground occasionally. The boys-ages 12 and 15-always walked to school together.Each morning, Leslie would read to his older brother or tell him the summary of what was going to be covered in hisreading class. Today he was reading "The Rocking Horse Winner." Leslie only had 15 minutes before reaching the buildingthat would separate him from his brother. To him, the building was a sign that he was still younger, weaker, and smallerthan Eric. The building, on the other hand, freed Eric. He felt less like a big guy outwitted by his little brother and more likethe basketball star of the high school. Until it was time to return home again, the boys lived their separate lives.Show LessHow does Leslie's character enhance Eric's character in the following passage?A. Leslie reading to his older brother highlights Eric's strength.B. Leslie's inclination toward books highlights Eric's athletic nature.C. Leslie's young age accentuates Eric's lack of experience and wisdom.D. Leslie's slow footsteps show how determined his older brother is. What are the best practices for safely handling waste in the lab? Select one or more: Check labels or instructions before any disposal. Always wear appropriate Personal Protective Equipment. Place any paper towels from the clean-up in the trash. Remove gloves for better manipulation of the waste containers 8cm 10cm 10cm 12cm 34cm whats the volume maya said,"I like pop music."