What is the output of the following C++ code?
int i = 0;
int temp = 1;
while (i < 5)
{
i = i + 1;
temp = temp * i;
}
cout << "i = " << i << " and temp = " << temp << endl;
i = 5 and temp = 120
Need a fast expert's response?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments
Leave a comment