Which of the following for statements would be executed the same number of times as the following
Question:
Which of the following for statements would be executed the same number of times as the following while statement?
int num = 10;
while(num > 0)
{
WriteLine(num);
num--;
}
a. for (num = 1; num < 10; num++)
b. for (num = 0; num < 10; num++)
c. for (num = 100; num == 10; num += 10)
d. for (num = 10; num < 0; num--);
e. none of the above
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
C# Programming From Problem Analysis To Program Design
ISBN: 9781285856872
5th Edition
Authors: Barbara Doyle
Question Posted: