Answer: adapted screenplays
Explanation:
you’re basing your script based off of other sources and stuff.
This for loop will output:
0
2
4
The range(3) is all the integers between 0 inclusive and 3 exclusive. 0, 1, 2.
Every iterations through the for loop, we multiply the value of each number by 2 and print it to the console.
0 * 2 = 0
1 * 2 = 2
2 * 2 = 4
I hope this helps.
Answer:
There are no drawbacks
Explanation:
People just think 3D is more modern-ish. I liked 2D better, but whatever- things are changing.
Answer:
Check the explanation
Explanation:
% iterate through each column (outer loop) , then iterate rows-1 (inner loop)
%take product of adjacent rows
mat = input('enter 5 by 5 matrix : ');
[R,C] = size(mat);
max_prod =0;
for c =[1:C]
for r=[1:(R-1)]
temp = mat(r,c)*mat((r+1),c);
if max_prod<temp
max_prod=temp;
end
end
end
fprintf('Greatest product : %i\n', max_prod)
Kindly check the output in the attached image below.