Computer Science, asked by patelarchee2006, 5 months ago

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 SƬᏗᏒᏇᏗƦƦᎥᎧƦ
51

int x = 10 , c = 20;

do

{

x++;

c = c -2;

}

while (c > 10);


Anonymous: Great!
SƬᏗᏒᏇᏗƦƦᎥᎧƦ: Thanks :-)
Anonymous: You're most welcome mate.
Answered by duragpalsingh
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