Computer Science, asked by hamzatiger1430, 1 year 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 duragpalsingh
8

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