Study the following portion of a Jjava program and answer the questions that follows.
while(i < 4){
j = 0;
While(j < 5){
System.out.println(“Please enter the value to be stored”);
Marks[i][j] = scan.nextInt();
j++;
}
i++;
}
i)
What do we call this block of code in programming?
[5]
ii)
What is the function of this block of code?
[5]
iii)
Using a table, write out the output of these statements.
[
Output
Please enter the value to be stored
4
Please enter the value to be stored
3
Please enter the value to be stored
5
Please enter the value to be stored
7
Please enter the value to be stored
4
Please enter the value to be stored
9
Please enter the value to be stored
8
Comments
Leave a comment