Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Write a program that will determine the average of the first six numbers and the average of the last fourteen numbers in a list

image text in transcribed
1. Write a program that will determine the average of the first six numbers and the average of the last fourteen numbers in a list of twenty numbers. For data use 48, 38, 28, 49, 49, 52,40, 56, 78 76, 43, 40, 84, 93, 75, 11, 19, 68, 81. 2. Assume that the population of the USA is 260 million and the population of Canada is 25 million. If the annual growth rates remain constant at 1.1% and 4.75%, respectively, what will be the populations over the next 50 years? In what year will the population of Canada exceed that of the USA? Consider a sequence of numbers which has the property that beginning with the fourth number, each number is the sum of the previous one and twice the one before that minus the one before that. For example, the 8th one is (the 7t one) plus twice (the 6th one) minus (the Sth one). Suppose that the first three numbers in the sequence are 1, 2, 3. Write a program which finds the first fifteen numbers. 3. 4. Write a program using loops will display the following design Modify the program such that the user now enters how many lines of stars. Bonus Points: Write a program called Factors.java that will read in a long value and displays all of the prime factors of the number read in. Ex. Input: 287994837222311 Factors: 17 1739347 9739789 Input: 140 Factors: 225 7

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions

Question

Explain the nature of human resource management.

Answered: 1 week ago

Question

Write a note on Quality circles.

Answered: 1 week ago

Question

Describe how to measure the quality of work life.

Answered: 1 week ago

Question

13. You always should try to make a good first impression.

Answered: 1 week ago