subject

Using vectors: Create a vector of integers of size 100, with random numbers ranging from 1 to 50. Print out these 100 numbers in a readable format. Find the average of these 100 numbers, print out the overall average. Then take the original list of 100 numbers, and find all the numbers that are between 1 and 30 and put them into a new vector. Do the same with all the numbers from 31 to 50 putting them into a third vector. Find the average of vectors 2 and 3 and call them avg1 and avg2. Print out avg1 and avg2. Find the average of avg1 and avg2. Write a final output line showing/comparing the average from step 3 and the average from step 7 are not the same, and hence the average of averages doesn't work. You have just proved a mathematical theorem.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:00
How can a broadcast station be received through cable and satellite systems?
Answers: 1
question
Computers and Technology, 22.06.2019 06:40
Match the personality traits with their description
Answers: 2
question
Computers and Technology, 22.06.2019 19:30
When creating a presentation in libre office impress, where does the editing of slides take place? a. the slides panel b. the center panel c. the tasks panel, under the masters pages tab d. the tasks panel, under the layouts tab
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
What are three software programs for mobile computing?
Answers: 1
You know the right answer?
Using vectors: Create a vector of integers of size 100, with random numbers ranging from 1 to 50. Pr...
Questions
question
Mathematics, 20.09.2020 06:01
question
Mathematics, 20.09.2020 06:01
question
History, 20.09.2020 06:01
Questions on the website: 13722363