menu
Qamnty
Login
Register
My account
Edit my Profile
Private messages
My favorites
How many times is the body of the loop executed? int i = 1; while (i<10) { cout << i; if (i == 5) break; i++; }
Ask a Question
Questions
Unanswered
Tags
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.8k
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 & Tech
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 & Tech
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 & Tech
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 & Tech
high-school
1
answer
5
votes
17.1k
views
Ask a Question
Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.
Categories
All categories
Mathematics
(3.7m)
History
(955k)
English
(903k)
Biology
(716k)
Chemistry
(440k)
Physics
(405k)
Social Studies
(564k)
Advanced Placement
(27.5k)
SAT
(19.1k)
Geography
(146k)
Health
(283k)
Arts
(107k)
Business
(468k)
Computers & Tech
(195k)
French
(33.9k)
German
(4.9k)
Spanish
(174k)
Medicine
(125k)
Law
(53.4k)
Engineering
(74.2k)
Other Questions
“What does it mean when we “rework” copyrighted material?”
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?
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search Qamnty