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
Math,
15 days ago
Science,
15 days ago
Math,
1 month ago
Social Sciences,
1 month ago
Physics,
8 months ago