Computer Applications
Rewrite the following code using for loop.
int i = 1;
int d = 5;
do
{
d = d * 2;
System.out.println(d);
i++;
} while(i <= 5);
Rewrite the following code using for loop.
int i = 1;
int d = 5;
do
{
d = d * 2;
System.out.println(d);
i++;
} while(i <= 5);