Computer Science, asked by ChhayaJaiswal68, 4 months ago

Convert for loop into while and do while loop
Question 1:
int sum=0, x=5;
for Cintial, i<= 15; itt)
ş
sum=sum + x
x +=39
3
System.out, println("Sum="t som;​

Attachments:

Answers

Answered by kamalrajatjoshi94
1

Answer:

int sum=0,x=5,i=1;

do

{

sum=sum+x;

x+=3;

}

while(i<=15);

System.out.println("Sum="+sum);

Similar questions