Answer:
A. 3.2% faster
B. 3.3% slower
C. 103.3%
Step-by-step explanation:
In order to find this out, we need to take the differences and divide them by the comparative time. So, in the first one, we take the difference (.32) and divide it by Hines time.
.32/9.63 = 3.2%
In the second, we take the difference and divide by Bolt's time.
.32/9.95 = 3.3%
And finally, in the last one, we take Hines' time and divide by Bolt's.
9.95/9.63 = 103.3%
The answer would be is 0.5
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;