Question: What numbers will the following code display on the computer screen? int total = 1; do { total += 2; cout < < total <

What numbers will the following code display on the computer screen? 

int total = 1; 

do 

total += 2; 

cout << total << endl; 

} while (total <= 3); 

a. 1, 2 

b. 1, 3 

c. 3 

d. 3, 5

Step by Step Solution

3.43 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Microsoft Visual C# Introduction Questions!