Question
C++

5.How many times will the following loop run? int i=5; while (i19) 6 . What is the output of the following code snippet? int time 1; int year2 int rate = 1; int principal = 5; int interest-0 cout <<i < endl while (year< 5) interest (principal * time rate) /1 ; cout << interest << endl; year++
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Ans:1

The loop will not execute anymore becuase condition (while(i>19) ) is false as 5>19 is not true.

so ans is zero times.

Ans:2

5
5
5

==============================================================

KIndly Check and Verify Thanks..!!!

Add a comment
Know the answer?
Add Answer to:
C++ 5.How many times will the following loop run? int i=5; while (i19) 6 . What...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT