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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:30, ghazanfarwaheed7967
Auniversity wants to install a client-server network. which feature do you think is important for them as they set up the network? sending email blocking multiple people to use the same file low security low set up cost limited access to files
Answers: 1
image
Computers and Technology, 23.06.2019 01:50, jumoke26
Create a class named majors that includes an enumeration for the six majors offered by a college as follows: acc, chem, cis, eng, his, phys. display the enumeration values for the user, then prompt the user to enter a major. display the college division in which the major falls. acc and cis are in the business division, chem and phys are in the science division, and eng and his are in the humanities division. save the file as majors. java.
Answers: 2
image
Computers and Technology, 23.06.2019 14:30, kodak0531
Which of the following would not be considered a pc? a. mainframe b. desktop c. tablet pc d. laptop
Answers: 2
image
Computers and Technology, 23.06.2019 15:30, jasssp
Write a program in plp assembly that counts up by one starting from zero (or one) inside a loop and writes this value to the leds every time the value is increased. the memory address of the leds is 0xf0200000. the table below shows the meaning and an example usage of the instructions covered in the video, plp instructions for project 1. instruction example usage meaning load immediate li $t0, 8 register $t0 is set to the value, 8. store word sw $t2, 0($t1) the value in register $t1 is used as the memory address. the value in register $t2 is copied into this memory address. add addiu $t4, $t3, 29 register $t4 is assigned the sum of 29 and the value in register $t3. jump j your_label_name the program jumps to the line following the label, "your_label_name: ". label your label name: defines a label called "your_label_name: " that can be jumped to
Answers: 2
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 in other subjects:

Konu
Mathematics, 17.09.2019 15:50