Question: 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
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
Get step-by-step solutions from verified subject matter experts
