menu
QAmmunity.org
Login
Register
My account
Edit my Profile
Private messages
My favorites
Ask a Question
Questions
Unanswered
Tags
Categories
Ask a Question
How many times is the body of the loop executed? int i = 1; while (i<10) { cout << i; if (i == 5) break; i++; }
asked
Feb 16, 2022
3.7k
views
2
votes
How many times is the body of the loop executed?
int i = 1;
while (i<10)
{
cout << i;
if (i == 5)
break;
i++;
}
Computers and Technology
college
Vishwajit Palankar
asked
by
Vishwajit Palankar
8.1k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
3
votes
Answer:
The loop will run 5 times.
Rwst
answered
Feb 22, 2022
by
Rwst
7.3k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
← Prev Question
Next Question →
Related questions
asked
Mar 10, 2022
160k
views
By using ONLY the language of C++, How many times the loop will be executed? int odd = 1, sum = 2, count = 9; do { sum = sum + odd; odd = odd + 2; cout >> sum count = count + 1; } while (count < 10) } MCQs: A) 1 B) 2 c) 0 d) 3
Renish Khunt
asked
Mar 10, 2022
by
Renish Khunt
7.8k
points
Computers and Technology
college
2
answers
0
votes
160k
views
asked
Aug 7, 2024
94.0k
views
What output will this code produce when executed? class Bob { public: Bob(int n) : hammer(n) { } int hammer = 52; }; int main() { Bob b; cout << b.hammer << '\\'; } a) 0 b) 52 c) Compilation error d) Runtime error
Flm
asked
Aug 7, 2024
by
Flm
8.5k
points
Computers and Technology
high-school
1
answer
4
votes
94.0k
views
asked
Apr 28, 2024
17.1k
views
What is output when the following code is executed? int x = 1; while (x <= 5) { cout << "Repeat " ; } cout << "Done!" << endl;
Trolologuy
asked
Apr 28, 2024
by
Trolologuy
7.2k
points
Computers and Technology
high-school
1
answer
5
votes
17.1k
views
Ask a Question
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.
9.5m
questions
12.2m
answers
Other Questions
“What does it mean when we “rework” copyrighted material?”
Seven basic internal components found in a computer tower
Please help me ! All you do is just put it it all in your own words ! Please this is for my reported card!i don't know how to put it in my own words because my English is not that good!
describe an advance in technology that makes life more enjoyable. what discoveries contribute to this technology?
Explain why binary codes are used to represent characters, numbers and symbols :)
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search QAmmunity.org