subject

Write code that fills an array values with each set of number belowR7.1a) 1 2 3 4 5 6 7 8 9 10for (int i = 0; i < 10; i++){ values[i] = i + 1;}b) 0 2 4 6 8 10 12 14 16 18 20for (int i = 0; i <= 10; i++){ values[i] = i * 2;}c) 1 4 9 16 25 36 49 64 81 100for (int i = 0; i < 10; i++){ values[i] = (i + 1) * (i + 1);}d) 0 0 0 0 0 0 0 0 0 0for (int i = 0; i < 10; i++){ values[i] = 0;}e) 1 4 9 16 9 7 4 9 11int[] values = {1, 4, 9, 16, 9, 7, 4, 9, 11};f) 0 1 0 1 0 1 0 1 0 1for (int i = 0; i < 10; i++){ values[i] = i % 2;}g) 0 1 2 3 4 0 1 2 3 4for (int i = 0; i < 10; i++){ values[i] = i % 5;}}

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 21:00, depression4eternity
The average cost of one year at a private college in 2012-2013 is $43,289. the average grant aid received by a student at a private college in 2012-2013 is $15,680.   what is the average student contribution for one year at a private college in 2012-2013?
Answers: 3
image
Computers and Technology, 23.06.2019 04:31, mjweed3381
Cloud computing service providers manage different computing resources based on the services they offer. which resources do iaas and paas providers not manage? iaas providers do not manage the for the client, whereas paas providers usually do not manage the for their clients. iaas- storage server operating system network paas- applications interafce storage vertualiation
Answers: 2
image
Computers and Technology, 23.06.2019 15:30, taapeters
Brian wants to conduct an online search with a certain phrase. he intends to use the words books that belong to the 1800s in his search. how should he use the word that in his search?
Answers: 1
image
Computers and Technology, 23.06.2019 19:30, wilkinsonei4069
Anul 2017 tocmai s-a încheiat, suntem trişti deoarece era număr prim, însă avem şi o veste bună, anul 2018 este produs de două numere prime, 2 şi 1009. dorel, un adevărat colecţionar de numere prime, şi-a pus întrebarea: “câte numere dintr-un interval [a, b] se pot scrie ca produs de două numere prime? “.
Answers: 1
You know the right answer?
Write code that fills an array values with each set of number belowR7.1a) 1 2 3 4 5 6 7 8 9 10for (i...

Questions in other subjects:

Konu
History, 27.01.2020 08:31