Convert the following segment into an equivalent do_while loop
int x, C;
for(x=10,c=20;c>=10;c=c-2)
X++
Answers
Answered by
51
int x = 10 , c = 20;
do
{
x++;
c = c -2;
}
while (c > 10);
Anonymous:
Great!
Answered by
3
Question:
Convert the following segment into an equivalent do loop.
int x,c;
for(x=10,c=20;c>10;c=c-2)
x++;
Solution:
int x, c;
x=10;
c=20;
do
{
x++;
c=c-2;
} while(c>10);
Similar questions