Computer Science, asked by moubanimondal15469, 1 year ago


(d) Convert following do-while loop
into for loop.
int i = 1;
int d = 5;
do{
d = d* 2;
System.out.println (d);
i++;
} while (i < = 5);​

Answers

Answered by anandsudhansh
10

Explanation:

int i,d=5;

for (i=0;i<5;i++)

{

d=d*2}

Answered by janinandini1310
7

Answer:

for(int i=1;i<=5;i++)

{

d=d*2;

System.out.println(d);

}

Explanation:

Similar questions