Question

Hi I am coding for java and I am trying to generate 20 numbers in the sequence of  1, 2, 4, 8, 16, 32, ...

I need them to be 5 for each row

This also requires using a for loop.

Then I have to calculate the sum and the average, and display it to the console.

 

Please include explanation for the steps. Thank you!

Expert Answer

Want to see the step-by-step answer?

See Answer

Check out a sample Q&A here.

Want to see this answer and more?

Step-by-step answers are written by subject experts who are available 24/7. Questions are typically answered in as fast as 30 minutes.*

See Answer
*Response times vary by subject and question complexity. Median response time is 34 minutes and may be longer for new subjects.

Related Computer Science Q&A

Find answers to questions asked by student like you
Show more Q&A

Q: PLEASE EXPLAIN ALL STEPS  In the following code, determine the values of the symbols this, that, and...

A: Before explaining the difference first user must know about the Assembly language.Assembly language:...

Q: Siobhan’s laptop has 8GB of RAM. Her operating system takes up 2GB, andher application programs use ...

A: It also depends that whether the graphic card is installed or not otherwise an 8 Gb of RAM itself is...

Q: Write a program that begins by reading a number of cents from the users as an integer (this is input...

A: Initialize all required currency named variable with 0 in python3 programming language so that the u...

Q: Write a program in Python for a (very) rudimentary shooter "game". You are the only shooter and you ...

A: NOTE: Sample output is missing in the question. The following program is executed for own sample out...

Q: In a file called CountMultiples.java, write a program that: Asks the user to enter an integer M. It...

A: Program code #1:

Q: Please explain how you solve the follwing problem:

A: The context free grammar is given below. To convert it into Chomsky normal form, some rules must be ...

Q: Consider the window size is 10, bandwidth is 1500 bps, transmission delay is 2 ms atpropagation dela...

A: Given information:

Q: Write the pseudocode  and Flowchart for a program that simulates the Magic eight ball game.

A: Pseudocode:Pseudocode is a detailed description of the algorithm of a program that is easier to read...

Q: MIPS assembly language please help    Write a program for a grocery store to calculate the total cha...

A: Some definitions required to know before doing this program: -1.What is Mars?2.What is MIPS?3.What i...