Math, asked by anusingamala, 10 months ago

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 pavithraelango02
0

Answer:

3 -3 -8 -12 -15

Step-by-step explanation:

it's option C

Attachments:
Answered by ssanskriti1107
0

Answer:

Option C :  3 \hspace{.2cm} -3 \hspace{.2cm} -8 \hspace{.2cm} -12\hspace{.2cm} -15

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:

3 \hspace{.2cm} -3 \hspace{.2cm} -8 \hspace{.2cm} -12\hspace{.2cm} -15

#SPJ3

Similar questions