Computer Science, asked by prathyushagovindraj, 10 months ago

a. Rewrite the following code using do-while loop:
inti,sum=0;
for(i=5;i<=50;i+=2)
sum=sumti;
System.out.println (sum);​

Answers

Answered by sahasuparno
1

int i;

int sum=0;

do{

sum=sum+i;

i=i+2;

} while(i<=50)

//print sum

Similar questions