Answer:
nElements = 0;
for (int i = 0; i < a2d.length; i++)
nElements += a2d[i].length;
isRectangular = true;
for (int i = 1; i < a2d.length && isRectangular; i++)
if (a2d[i].length != a2d[0].length)
isRectangular = false;
Step-by-step explanation:
2 dimensional array is created and initialize element with 0. and the taking loop for 2 dimensional array .such as
n Elements = 0;
for (int i = 0; i < a2d.length; i++)
n Elements += a2d[i].length;
A boolean variable isRectangular and 2 dimensional array has been created if rectangle is true the take a2d.length and isRectangular less than i and intiliaze i with 1 then increment the i .It will give true value.
If rectangular is false then apply if statement and see if a2d[i] is not equal to a2d[0]
if (a2d[i].length != a2d[0].length)
isRectangular = false;
Answer:
f(x) = |x - 4| + 3
Step-by-step explanation:
Identify (from the graph) the coordinates of the vertex: (4, 3). That +4 tells us that the vertex of the basic function y = |x| has been translated 4 units to the right; that +3 tells us that the vertex has also been translated 3 units up. Consider y = |x-a| + b. Here, b = +3 and a=+4. Thus, the correct function is f(x) = |x - 4| + 3.
Answer:
187
Step-by-step explanation:
A number m is such that when it is divided by 30, 36 and 45 the remainder is always 7.
We should first find the LCM of 30, 36 and 45
We get that the LCM of the three numbers is 280 (working attached).
So now;
= 6
= 5
= 4
But we need a number that leaves a remainder of 7 so we add 7 to 180 to get; 180 + 7 = 187.
2(10x4)+(10x5)+(5x4)
2(40)+(50)+(20)
2x110
220
Answer is 220cm squared
Answer: 13
Step-by-step explanation:
First, we have to arrange the numbers in either ascending or descending order.
12,11,13,12,15,16, and 14 hours will then be: 11, 12, 12, 13, 14, 15 and 16.
The median will be gotten using the formula: = (n + 1) / 2
Since there are 7 numbers this will be:
= (n + 1) / 2
= (7 + 1) / 2
= 8/2
= 4th number
Since 13 is the 4th number, it's the median