Computers and Technology
Computers and Technology, 06.05.2021 20:00, babyshazi

Consider the following code segment. int[][] multi = new int[4][4];
for (int rows = 0; rows < 4; rows++)
{
for (int cols = 0; cols < 4; cols++)
{
if (cols == 0)
{
multi[rows][cols] = 0;
}
else if (cols == 1)
{
multi[rows][cols] = 1;
}
else if (cols == 2)
{
multi[rows][cols] = 2;
}
if ((rows % 2 == 0) && (cols % 2 == 0))
{
if ((rows >= 2) && (cols <= 2))
{
multi[rows][cols] = 9;
}
}
}
}

As a result of executing the code segment, how many elements in the two-dimensional (2D) array multi will store the value 9?

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 17:30, kallee10
The forerunner to cell phones, pdas, and smartphones was
Answers: 1
image
Computers and Technology, 22.06.2019 22:00, bbysl15
What is the name of the option in most presentation applications with which you can modify slide elements? 1. the option enables you to modify a slide element in most presentation applications.
Answers: 3
image
Computers and Technology, 22.06.2019 22:50, youngboymark123
Assume the existence of a bankaccount class. define a derived class, savingsaccount that contains two instance variables: the first a double, named interestrate, and the second an integer named interesttype. the value of the interesttype variable can be 1 for simple interest and 2 for compound interest. there is also a constructor that accepts two parameters: a double that is used to initialize the interestrate variable, and a string that you may assume will contain either "simple", or "compound", and which should be used to initialize the interesttype variable appropriately. there should also be a pair of functions getinterestrate and getinteresttype that return the values of the corresponding data members (as double and int respectively).
Answers: 2
image
Computers and Technology, 23.06.2019 00:30, hannahrasco4051
Pl i need the answer now ! which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 1
Do you know the correct answer?
Consider the following code segment. int[][] multi = new int[4][4];
for (int rows = 0; rows...

Questions in other subjects:

Konu
Mathematics, 14.11.2020 01:00
Konu
Mathematics, 14.11.2020 01:00
Konu
Mathematics, 14.11.2020 01:00