Study the snippet given below and answer the following questions:
int j,k,p=-1;
for(j=-2;j<=1;j++)
{
for(k=j;k<=0;k++)
k = Math.max(j*k,p);
System.out.print(k);
p=p+2;
}
(i) How many times will the outer loop run? (Show dry run)
(ii) Predict the output.
Answers
Answered by
1
Answer:
4 times -2,-1,0,1
output-
-1/4
-1
0
Explanation:
please mark it as branliest
Similar questions