Answer to Question #23142 in C++ for makasa

Question #23142
int main(viod)
{
int height=5;
while(height<8)
{
print("the statement evaluted to true!");
height+1;
}
return 0;
assuming libraries are included how many times will sentence print out?
1
Expert's answer
2013-01-29T11:52:13-0500
int height = 5
while(height<8) //5<8 true
{
print("the statement evaluted totrue!");//first time
height+1; //height = 6
}

while(height<8) //6<8 true
{
print("the statement evaluted totrue!");//second time
height+1; //height = 7
}

while(height<8) //7<8 true
{
print("the statement evaluted totrue!");//third time
height+1; //height = 8
}

while(height<8) //8<8 false
END



three times

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

dinesh
29.01.13, 17:34

write a program in c++ calculate the area of circle write a program in c++ to demonstrat the use of inheritans

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS