menu
Qammunity.org
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.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 & 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 QAmmunity.org, where you can ask questions and receive answers from other members of our community.
9.4m
questions
12.2m
answers
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?”
The book shows how to add and subtract binary and decimal numbers. However, other numbering systems are also very popular when dealing with computers. The octal (base 8) numbering system is one of these.
Seven basic internal components found in a computer tower
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search Qammunity.org