160k views
0 votes
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

2 Answers

1 vote

Answer: Syntax error. So it would be 0.

After correcting syntax it would be 1

Step-by-step explanation:

Braces never started in beginning but put in the end after while loop

User Salt Hareket
by
3.5k points
3 votes

Answer:

0

Step-by-step explanation:

User Xavier Lucas
by
3.2k points