Q 19 What will be the output of the following pseudocode?
1. Integer a ,b
2. Set a = 10, b = 7
3. for(int i = 1; i <= 5; i++)
a = a + i + b
5.
while (a > 6 )
a = a + b
b = b 1
6.
7.
8.
a = a
9.
10.
end while
Print a
End for
11.
Ops: A
-6-13-19 -24 -28
В.
3210-3
c. 03 -3 -8-15
33 -8 -12 -15
Answers
Answered by
0
Answer:
3 -3 -8 -12 -15
Step-by-step explanation:
it's option C
Attachments:
Answered by
0
Answer:
Option C :
Step-by-step explanation:
The code of the following will be written as
int a = 10, b = 7;
for(int i = 1; i <= 5; i++){
a = a + i + b;
while (a > 6 ){
a = a + b;
b = b -1;
a = a - 1;
}
System.out.println(a);
}
Output of the following:
#SPJ3
Similar questions