Anybody tell the answer for the attachment. Only give the explanation not the output.
Attachments:
Answers
Answered by
31
- The final value of a is 15.
⊕ The initial value of a is – 5
⊕ Condition – a must be less than 15.
⊕ a is incremented by 2.
The possible values of after each iteration are –
⊕ Now, as soon as the value of a becomes 15, the condition becomes false. So, no more increment takes place. So, the final value of a becomes 15.
⊕ Therefore, the value of a outside the loop is – 15.
Similar questions
English,
1 month ago
Math,
1 month ago
Math,
2 months ago
Social Sciences,
2 months ago
Physics,
9 months ago