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, 21.06.2019 22:30
Outdoor and indoor equipment must include a. only toys that are soft. b. equipment that is age-appropriate and developmentally appropriate. c. areas that allow children to play together. d. high toys that allow children to practice gross motor skills.
Answers: 2
Health, 23.06.2019 17:00
Which of the following statements about the societal costs of tobacco use is true? a. tobacco use affects the tax rate of only those individuals who smoke. b. the negative effects of tobacco use are only experienced by the smoker. c. tobacco users contribute to an overall loss of productivity. d. increased healthcare costs are mainly absorbed by tobacco users
Answers: 2
Health, 24.06.2019 07:00
98 points! which of the following is not a path to becoming a registered nurse? 1. graduating from a four-year bachelor of science in nursing program 2. appointment to a registered nursing position by the state health department 3. completing the diploma program administered by an accredited hospital 4. completing the two- or three-year nursing program at a community, junior or professional college
Answers: 2
Health, 24.06.2019 08:30
As a result if excessive vomiting people with bulimia often have low levels
Answers: 2
Mathematics, 16.01.2021 01:00
Mathematics, 16.01.2021 01:00
Physics, 16.01.2021 01:00
Mathematics, 16.01.2021 01:00
Mathematics, 16.01.2021 01:00
Mathematics, 16.01.2021 01:00
Mathematics, 16.01.2021 01:00
Mathematics, 16.01.2021 01:00
Spanish, 16.01.2021 01:00
Mathematics, 16.01.2021 01:00
Mathematics, 16.01.2021 01:00