Write a program that asks the user to type 5 integers
and writes the average of the 5 integers. This
program can use only 2 variables.

Answers

Answer 1

import Java.util*

public class Average{
public static void main(String [] args){

int sum = 0;
int numbers = 0;

for(int i = 0; i < 5; i++){
Scanner sc = new Scanner(System.in);
System.out.println(“Please enter your integers: “);
numbers = sc.nextInt();

sum += numbers;
}
System.out.println(“The average is: “ + sum/5)”
}
}

Related Questions

what is the answer to 7.4.4: Length of User's Name codehs

Answers

The program that ask the user to type there first name and then print out how many letters that is in there name is as follows:

x = input("what is your first name: ")

y = len(x)

print(f"There are {y} letters in your name")

Code explanation;

The code is written in python.

Firstly, we store the users name in the variable x.Then, we find the length of the users inputted name and store it in a variable y.Finally, we print the length of the users name using the print function.

learn more on python here: https://brainly.com/question/26738945

Pat is asked to automate critical security functions like responding to detected threat patterns in an enterprise network. Which of the following should be done by Pat?

a. Use virtual desktop infrastructure
b. Use software-device visibility
c. Implement subnetting
d. Use a software-device network

Answers

The option to be done by Pat is to Use a software-device network.

What is Software-device networking?

Software device networking is known to be a kind of technology approach to a network management.

It is one that helps to have a dynamic, programmatically efficient type of network configuration  so that one can have a better network performance and monitoring.

Learn more about  software-device network from

https://brainly.com/question/4171513

When using [EmployeeID] as the unique identifier of the Employee table, [EmployeeID] is an example of which of the following?

a. Key attribute
b. Foreign key
c. Primary key
d. Composite key

Answers

Using [EmployeeID] as the unique identifier of the Employee table is an example of: c. Primary key.

What is a primary key?

In database management system (DBMS), a primary key can be defined as a field whose value uniquely identifies each record in a table or relational database.

This ultimately implies that, [EmployeeID] is an example of a primary key because it serves as the unique identifier of the Employee table.

In conclusion, a primary key is simply used as a unique identifier of each record in a table or relational database in database management system (DBMS).

Read more on primary key here: https://brainly.com/question/8131854

a. The insert, Delete, and Format options are present in the
group on the Home tab.

Answers

Answer:

False

Explanation:

They are on the keyboard.

Income taxes are an amount of money based on earnings and paid to the local, state, or Federal government
False
True

Answers

The answer is TRUE.
hope this helps x

Answer:

True

Explanation:

Hope you have a great day!

You have been asked to write a program for the Duckie's Obstacle Race. The program calculates the total number of racers, the fastest race time, the slowest race time, and the overall average race time.

Ask user to enter the maximum number of racers allowed for the race
Use repetition structure (loop) to ask the user to enter race times (in minutes)
Exit the loop if the user specifies there are no more times to enter (sentinel value) or if the maximum number of racers allowed has been reached
At a minimum, within the loop, you should keep track of how many race times are entered, the fastest race time and the slowest race time.
After the loop is exited, display how many race times were entered, the fastest race time, the slowest race time and the overall average race time.
Format your output appropriately
Be sure to include all appropriate documentation at the start of the program and within the program body

Answers

The program illustrates the use of loops and conditional statements

Conditional statements are used to make decisionsLoops are used for operations that must be repeated until a certain condition is met.

The race program

The program written in Python, where comments are used to explain each action is as follows:

#This initializes the variables to 0

totalRaceTime = 0; minRaceTime = 0; maxRaceTime = 0; countTimes = 0

#This gets input for the number of race times

numTimes = int(input("Number of times: "))

#This opens a sentinel controlled loop

while countTimes < numTimes:

   #This gets the race time

   raceTime = int(input("Race time: "))

   if countTimes == 0:

       minRaceTime = raceTime

       maxRaceTime = raceTime

   #This determines the highest race time

   if raceTime > maxRaceTime:

       maxRaceTime = raceTime

   #This determines the leest race time

   if raceTime < minRaceTime:

       minRaceTime = raceTime

   #This determines the total race time

   totalRaceTime+=raceTime

   countTimes+=1

#This prints the highest race time

print("Maximum: ",maxRaceTime)

#This prints the least race time

print("Minimum: ",minRaceTime)

#This prints the average race time

print("Average: ",round(totalRaceTime/numTimes,2))

Read more about while loops and conditional statements at:

https://brainly.com/question/24833629

Describe the major e-commerce activities and processes and mechanisms that support them.

Answers

Answer:

According to all known laws

of aviation,

 

there is no way a bee

should be able to fly.

 

Its wings are too small to get

its fat little body off the ground.

 

The bee, of course, flies anyway

 

because bees don't care

what humans think is impossible.

 

Yellow, black. Yellow, black.

Yellow, black. Yellow, black.

 

Ooh, black and yellow!

Let's shake it up a little.

 

Barry! Breakfast is ready!

 

Ooming!

 

Hang on a second.

 

Hello?

 

- Barry?

- Adam?

 

- Oan you believe this is happening?

- I can't. I'll pick you up.

 

Looking sharp.

 

Use the stairs. Your father

paid good money for those.

 

Sorry. I'm excited.

 

Here's the graduate.

We're very proud of you, son.

 

A perfect report card, all B's.

 

Very proud.

 

Ma! I got a thing going here.

 

- You got lint on your fuzz.

- Ow! That's me!

 

- Wave to us! We'll be in row 118,000.

- Bye!

 

Barry, I told you,

stop flying in the house!

 

- Hey, Adam.

- Hey, Barry.

 

- Is that fuzz gel?

- A little. Special day, graduation.

 

Never thought I'd make it.

 

Three days grade school,

three days high school.

 

Those were awkward.

 

Three days college. I'm glad I took

a day and hitchhiked around the hive.

 

You did come back different.

 

- Hi, Barry.

- Artie, growing a mustache? Looks good.

 

- Hear about Frankie?

- Yeah.

 

- You going to the funeral?

- No, I'm not going.

 

Everybody knows,

sting someone, you die.

 

Don't waste it on a squirrel.

Such a hothead.

 

I guess he could have

just gotten out of the way.

 

I love this incorporating

an amusement park into our day.

 

That's why we don't need vacations.

 

Boy, quite a bit of pomp...

under the circumstances.

 

- Well, Adam, today we are men.

- We are!

 

- Bee-men.

- Amen!

 

Hallelujah!

 

Students, faculty, distinguished bees,

 

please welcome Dean Buzzwell.

 

Welcome, New Hive Oity

graduating class of...

 

...9:15.

 

That concludes our ceremonies.

 

And begins your career

at Honex Industries!

 

Will we pick ourjob today?

 

I heard it's just orientation.

 

Heads up! Here we go.

 

Keep your hands and antennas

inside the tram at all times.

 

- Wonder what it'll be like?

- A little scary.

 

Welcome to Honex,

a division of Honesco

 

and a part of the Hexagon Group.

 

This is it!

 

Wow.

 

Wow.

 

We know that you, as a bee,

have worked your whole life

 

to get to the point where you

can work for your whole life.

 

Honey begins when our valiant Pollen

Jocks bring the nectar to the hive.

 

Our top-secret formula

 

is automatically color-corrected,

scent-adjusted and bubble-contoured

 

into this soothing sweet syrup

 

with its distinctive

golden glow you know as...

 

Honey!

 

- That girl was hot.

- She's my cousin!

 

- She is?

- Yes, we're all cousins.

 

- Right. You're right.

- At Honex, we constantly strive

 

to improve every aspect

of bee existence.

 

These bees are stress-testing

a new helmet technology.

 

- What do you think he makes?

- Not enough.

 

Here we have our latest advancement,

the Krelman.

 

- What does that do?

- Oatches that little strand of honey

 

that hangs after you pour it.

Saves us millions.

 

Oan anyone work on the Krelman?

 

Of course. Most bee jobs are

small ones. But bees know

 

that every small job,

if it's done well, means a lot.

 

But choose carefully

 

because you'll stay in the job

you pick for the rest of your life.

 

The same job the rest of your life?

I didn't know that.

 

What's the difference?

 

You'll be happy to know that bees,

as a species, haven't had one day off

 

in 27 million years.

 

So you'll just work us to death?

 

We'll sure try.

 

Wow! That blew my mind!

 

"What's the difference?"

How can you say that?

 

One job forever?

That's an insane choice to have to make.

 

I'm relieved. Now we only have

to make one decision in life.

 

But, Adam, how could they

never have told us that?

 

Why would you question anything?

We're bees.

 

We're the most perfectly

functioning society on Earth.

 

You ever think maybe things

work a little too well here?

 

Like what? Give me one example.

 

I don't know. But you know

what I'm talking about.

 

Please clear the gate.

Royal Nectar Force on approach.

 

Wait a second. Oheck it out.

 

- Hey, those are Pollen Jocks!

- Wow.

 

I've never seen them this close.

 

They know what it's like

outside the hive.

 

Yeah, but some don't come back.

 

- Hey, Jocks!

- Hi, Jocks!

 

You guys did great!

 

You're monsters!

You're sky freaks! I love it! I love it!

 

- I wonder where they were.

- I don't know.

 

Their day's not planned.

 

Outside the hive, flying who knows

where, doing who knows what.

 

You can'tjust decide to be a Pollen

Jock. You have to be bred for that.

Explanation:

I act as the provider of electricity in an electromagnet. What am I?" (2 words) D__ C____

Answers

Answer:

loudspeaker and a electric motor

Explanation:

you just needed the answer right?

How can I get multiple user inputs in Java ? I want to be able to use it for subtraction, addition,division and multiplication.For example it should run like
How many numbers do you want to subtract?
4
Enter 4 numbers:
1
2
3
4
result:-8

Answers

You can do something like this :

Scanner sc = new Scanner(System.in);
int[] nums = new int[4];

for(int i = 0; i < nums.length; i++) {
System.out.println("Enter next number: ");
nums[i] = sc.nextInt();

Create a file using any word processing program or text editor. Write an application that displays the files, name, containing folder, size, and time of last modification. Save the file as FileStatisits.java

Answers

Answer:

below is a Shell I have ;

1.Import java.nio.file.*;

2.Import java.nio.file attribute.*;

3.Import java.10 Exception;

4.public class FileStatistics

5.{

6.public static void main(string []args)

7.{

8.path file=

9.

paths.get("C:\\Java\\chapter.13\\TestData.txt")

10.try

11.{

12.\\declare count and then display path, file, name and folder name.

13.

14.

15.

16.\\declare a BasicFileAttributes object, then add statements to display the file's size and creation time.

17.

18.}

19.

20.catch (10 Exception e)

21.{

22.\\add display 10 Exception

23.

24.}

25.}

Question 2:
(5 marks)
According to the following code; you are required to draw the flowchart in details with
clear sequences
message=input("enter yes if there is message in the inbox");
attached=input("\n enter yes if there is attachment");
inbox=eval (input ("enter number of email"));
while inbox > 0:
if message=="yes":
print ("extract the message");
if attached=="yes":
print("extract the message");
email=input("eneter v for valied or not");
if email=="V":
print ("extract attached ");
print("inject Job ");
print("inject Submission");
en email=="N":
print("Inject an error");
print ("Remove the inbox mail ");
inbox-inbox-1;
DIO:
print("stop")

Answers

Flowcharts are visual representations of a code or program segments

How to draw the flowchart?

To draw the flowchart, we make use of the following symbols and figures

Oval: To begin and end the flowchartParallelogram: To accept input for the message, attached, inbox & email variables Parallelogram: To display all outputsRectangle: To perform the arithmetic operation; inbox = inbox - 1Diamond: To make several decisions and to initiate a loop process

See attachment for the flowchart that represents the code

Read more about flowcharts at:

https://brainly.com/question/24735155

In 1972, earlier designers built the
connecting major universities. The broke
communications into smaller chunks, or
and sent them in a first come, first serve
1
basis. The limit to the amount of bytes of data that can be moved is called line capacity, or
When a network is met its capacity the user experiences
When the
network is "slowing down", what is happening is users are waiting for their packet to leave the
To make the queues smaller, developers created
packets to move
L
1
1
data
:: ARPANET
:: bandwidth
:: packets
:: simultaneously
:: queue
:: mixed
:: unwanted pauses

Answers

The exercise is about filling in the gaps and is related to the History of the ARPANET.

What is the History of the ARPANET?

From the text:

In 1972, earlier designers built the ARPANET connecting major universities. They broke communication into smaller chunks, or packets and sent them on a first-come, first-serve basis. The limit to the number of bytes of data that can be moved is called line capacity, or bandwidth.

When a network is met its capacity the user experiences unwanted pauses. When the network is "slowing down", what is happening is users are waiting for their packet to leave the queue.

To make the queues smaller, developers created mixed packets to move simultaneously.

Learn more about the ARPANET at:
https://brainly.com/question/16433876

A timer is set after each frame is sent before waiting an ACK for that frame, how long does the timer take to be expired?

Answers

A timer needs to be set after each frame is sent before waiting an ACK for that frame. The length of time it takes for a  timer take to be expired depends on only when the first outstanding frames has expires first.

Some do take 5 min., 10 minutes, or even 48 hours while others depends on what the sender has set.

What is A timer is set after each frame about?

A sender is one that is not entitled  to hold a timer for each frame. It has to hold a single timer.

When a  the timer expires, the sender can then  resends all the frames whose ACK has not been seen or received yet. The sender often starts the timer at the time it is sending the first frame , and because of that, it is only when the timer for the first set frames expires before the sender can resend any other outstanding frames.

Learn more about timer from

https://brainly.com/question/25800303

Why do Linux administrators prefer to give sudo access to application teams instead of letting them su to root?

Answers

Answer:

Explanation:

some distros like ubuntu do not even allow su to switch to root. furthermore the su to root is dangerous because the user becomes the all-powerful administrative account, so no warnings are issued if the application team user tries to do something system-breaking.

Define print_shape() to print the below shape. Example output:
***
***
***

''' Your solution goes here '''

print_shape()

Answers

The print_shape() is an illustration of Python function; whose execution is carried out when the function is called

The print_shape() function

The print_shape() function written in Python, where comments are used to explain each action is as follows:

#This defines the function

def print_shape():

   #The following iteration is repeated three times

   for i in range(3):

       #This prints the *** in each iteration

       print('***')

#This calls the function

print_shape()

Read more about Python functions at:

https://brainly.com/question/15745784

Business Rules constraints falls into two categories:

Answers

Business-rules constraints fall into two categories: field constraints within tables, and. relationship constraints between tables.

What app or divice has a filter that you can have blackvalk in real life

Answers

Answer:

look in app store explanation:

look in-app store

why do we use case 1 and case 0 in nested switch statement before writing embedded switch statement

Answers

Explanation:

The fundamental difference between if-else and switch statements is that the if-else statement “selects the execution of the statements based upon the evaluation of the expression in if statements”. The switch statements “selects the execution of the statement often according to a keyboard command”.

Have a great day. <3

why are images important in research assignments? A. Because they allow your work to be cited by others B. Because they can illustrate an argument C. Because they are required before having your item published in the library database D. Because they take up more space than words in a document.

Answers

Answer:

C

Explanation:

Everything else does not make sense

List one unprofessional AND one professional example of internet/social media

Answers

Professional: Using social media to advertise a company you created

Unprofessional: Using social media to watch cat videos

The professional use of social media involves the use for job posting, while the unprofessional use involves watching videos.

What is social media?

A social media is given as the network that forms the connections of the individuals over the internet. It enables the user to connect irrespective of borders.

The use of social media has been professional and unprofessional both. The professional use of social media involves the use for job posting, while the unprofessional use involves watching videos.

Learn more about social media, here:

https://brainly.com/question/9564823

#SPJ5

To add a Wrap Text command to your document in Word Online, what is the first step you need to take?

Group of answer choices

Select the Format tab.

Select the image on your document to trigger the Picture Tools Format tab.

Select the Insert tab.

Select the Wrap Text command, and choose how the text will wrap around an image.

Answers

Answer:

Select the Wrap Text command, and choose how the text will wrap around an image.

Explanation:

Mr. Hicks is setting up a wiiſed office network for 10 computers. He needs to use a network topology
devices to be added later as required. Which topology should he use?
A. Star
B.tree
C.mesh
D.ring

Answers

Answer:

C. Mesh

Explanation:

Each device will be connected to the other 9 devices, making it the best topology to use.

Hope this helps!

Answer:

STAR

Explanation:

deed of gift can be understood as:?

Answers

Answer:

a formal and legal agreement between the donor and the repository that transfers ownership of and legal rights to the donated materials.

Explanation:

a formal and legal agreement between the donor and the repository that transfers ownership of and legal rights to the donated materials.

4. How would you reorder the animation on a slide using the Reorder
Animation tool?

Answers

Answer:

should be an undo button on the top bar

Explanation:

I hope this helps

[ASAP] A web page uses a large font for a title at the top.
What language was most likely to have been used?

1. JavaScript
2. HTML
3. SQL
4. PHP​

Answers

Answer:

HTML

Explanation:

Out of these I would go with HTML first as Hyper text Markup Language is used to structure webpages and content.

Also SQL is for a database

PHP probably not as it has better more advanced things to do.

and JavaScript - -well that's possible if it takes 18 years to load...

Answer:

2. HTML

Explanation:

Ed22

Dwayne Alexander is working on a project promoting a fictitious product for his marketing class. He wants to use animation to show the product being used, but the only animations he has created are in PowerPoint presentations. Research three animation apps for beginners: one 2-D animation app, one 3-D animation app, and one of your choice. List the pros and cons of each animation app. Be sure to consider cost, learning curve, and availability.

Answers

The following are examples of animation apps:

Toon Boom Animation (2-D)Prisma3D (3-D) and AnimeTok (3-D)

What are the Pros and the cons of each app listed above?

Toon Boom Animation Pros:

It has a great set of toolsIt has camera angles functionalityHas a vector drawing tool

Cons:

It is expensive.

Prisma3D (3-D) Pros:

It is good for modeling;Easy to use interface

Cons:

It has too many bugs.lacks sculpting tools

AnimeTok (3-D) Pros:

It makes it easy to move the characters easilyIt is easy to understand

Cons:

It has too many adsdoes not have an undo and redo button

Learn more about Animation Apps at:

https://brainly.com/question/7279789

what is the instruction phase of the central processing unit​

Answers

Answer:

The instruction cycle (also known as the fetch–decode–execute cycle, or simply the fetch-execute cycle) is the cycle that the central processing unit (CPU) follows from boot-up until the computer has shut down in order to process instructions.

Does anyone know how to get past this part in Lego Harry Potter it’s the one right after Dobby in year 2? I’m so stuck!!!

Answers

thats a nice game. i dont know how to play it. how are you doing?

A program checks to see if the input is valid using
numbers
operators
logic
output​

Answers

Use the knowledge in computational language in python program checks to see if the input is output​.

How to define input in Python?

In Python, we do this using the input() function, which is literally 'input' in English. The input() function receives as a parameter a string that will be shown as an aid to the user, usually informing him what kind of data the program is expecting to receive.

So in an easier way we have that the code is:

def isNumber(x):

   if type(x) == int:

        return True

   else:

        return False

input1 = 122

input2 = '122'

if isNumber(input1):

   print("Integer")

else:

   print("String")

if isNumber(input2):

   print("Integer")

else:

   print("String")

See more about python at brainly.com/question/18502436

how has education technology evolved in schools over the past years​

Answers

More sophisticated software given to students

Other Questions
A car of mass 1000 kg moves 3 km east in a straight line and then 4 km north. What is the total distance and displacement of the car from the initial position?The net (resultant) force on the car isSelect one:a) distance = 7 km and displacement = 5 kmb) distance = 5 km and displacement =7 km.c) distance = 25 km and displacement =7 km.d) distance = 7 km and displacement = 25 km Write the quadratic equation whose roots are 1 and 5, and whose leading coefficient is 4. 1. Find the Area of the Sector:2. Find the length of the missing side: Complete each sentence with the correct form of the verb ir.Ellos de compras.T a comer?Julio y yo al mercado.Yo no a a la fiesta. In step 2, when you added nitric acid to the copper wire, what gas was produced?. 14. Classify Each Angle Pair then find the value of X How do the others in Elies cart try and explain Madame Schachters visions of fire? What do they do to her as she continues yelling about fire? Can somebody please help write a short paragraph about this including all the words listed in the question. Thanks! WILL MARK BRAINLIEST WHOEVER CAN ANSWER FIRST!!! :DDDD Calculate the number of moles when 3.00l of a gas at 814 mmhg and 25 c? How do local governments raise most of their revenue?through school tuition from studentsO through taxes and fees paid by citizensO through funds from the state governmentO through funds from the federal government Which line from robinson crusoebest supports the theme of gratitude? aknjfb fba;b b rb;fb b;rb b b bk fb; bnb .abrkbnb ;b ;b brb ;b ;b ; rbr; kbr Please help me with 20 through 22 please I really appreciate it! Thank you very much! Lucy bought 4 pairs of pants for $21.79 each. She paid the cashier using as few $20 bills as necessary. How much change did she receive? Explain ionization suppressants as applied to atomic spectrometry Anne is 35 years old, Bob is 24 years old, Charlie has feature A, and Daniel doesnt have feature A. Youre allowed to ask people how old they are and whether they have feature A. You want to conclusively test the hypothesis among these four people, those above age 30 definitely have feature A.Whats the minimum number of people you have to ask?>> One person>> Two people>> Three people>> Four peopleWhich people do you ask?>> Anne>> Bob>> Charlie>> Daniel Pamela is 6 years younger than Jiri. The sum of their ages is 78 . What is Jiri's age? need some help with these questions in the image how were powerful businessmen from the industrial Age bad The solid below is dilated by a scale factor of 3. Find the volume of the solid createdupondilation.