Three students, studying the use of arrays, presented the
following statements.
I - The...
Health, 05.11.2020 16:00 mbrisen7420
Three students, studying the use of arrays, presented the
following statements.
I - The first student developed code 1 and concluded that his code makes use of
correct array and C ++ language.
#include <iostream>
using namespace std;
int main () {
int i, j, m [12] [12];
for (i = 0; i <12; i ++) {
for (j = 0; j <12; j ++) {
m [i] [j] = j% 2 - 1;
}
}
for (i = 0; i <12; i ++) {
for (j = 0; j <12; j ++) {
m [i] [j] = -1 - m [i] [j];
}
}
}
Code 1
II - The second student developed code 2 and concluded that his code does
correct use of arrays and the C ++ language.
#include <iostream>
using namespace std;
int main () {
double a [10] [5] = {{10}, {5}, {6}}, x [5] = {5}, b [10] = {1};
int i, j, m = 10, n = 5;
for (i = 0; i <m; i ++) {
b [i] = 10.0;
for (j = 0; j <n; j ++) {
b [i] = b [i] + a [i] [j] * x [j];
}
}
}
Code 2
III - The third student developed code 3 and concluded that his code makes use of
correct array and C ++ language. # include <iostream>
#include <iostream>
using namespace std;
const int N = 2;
int main () {
int i, j, k, a [N] [N] = {2,0,0,1}, b [N] [N] = {1,1,1,1}, c [N] [N] = {1,2,3,4};
for (i = 0; i <N; i ++) {
for (j = 0; j <N; j ++) {
c [i] [j] = 0;
for (k = 0; k <N; k ++) {
c [i] [j] + = a [i] [k] * b [k] [j];
}
}
}
}
Code 3
Check the correct alternative:
a) Only alternative I is true
b) Only alternative II is true
c) Alternatives I and II are true
d) Alternatives II and III are true
e) All statements are true
Answers: 2
Health, 22.06.2019 15:20
[120 total points] (public health) in one of the largest human experiments ever conducted, in 1954 a randomized controlled trial was run to see whether a vaccine developed by a doctor named jonas salk was effective in preventing paralytic polio. a total of 401,974 children (ages 6–9), chosen to be representative of those who might be susceptible to the disease, were randomized to two groups: 200,745 children (the control group c) were injected with a harmless saline solution (a placebo) and the other 201,229 children (the treatment group t) were injected with salk’s vaccine.what was the point of giving saline solution to the children who didn’t get the vaccine? explain briefly.
Answers: 2
Health, 23.06.2019 09:00
Suppose you are facilitating an advisory group to address teen pregnancy. whom would you invite to the group and why ? .
Answers: 1
Health, 23.06.2019 13:30
During times of strees what increased in the body causing the body sex hormones to decrease
Answers: 1
Health, 23.06.2019 15:30
Mary has spontaneously decided to prepare a meal for friends. she is beginning to prepare fin fish and realizes she wants to also prepare a hearty dish ready to serve at the same time. what should she prepare?
Answers: 1
English, 08.04.2021 22:00
Spanish, 08.04.2021 22:00
Mathematics, 08.04.2021 22:00
Mathematics, 08.04.2021 22:00
Mathematics, 08.04.2021 22:00
Social Studies, 08.04.2021 22:00
Social Studies, 08.04.2021 22:00
Mathematics, 08.04.2021 22:00