(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
10
Explanation:
int i,d=5;
for (i=0;i<5;i++)
{
d=d*2}
Answered by
7
Answer:
for(int i=1;i<=5;i++)
{
d=d*2;
System.out.println(d);
}
Explanation:
Similar questions