Respuesta :
Hi,
the program is as follows
___________________________________________________________
import java.io.*;
class doubleval
{
public static void main()throws IOException
{
DataInputStream dt=new DataInputStream(System.in);
System.out.println("Enter NUMBER WHOSE DOUBLE U WANT TO PRINT");
int n=Integer.parseInt(dt.readLine());
for(int i=n;i<=100;i=2*i)
{
System.out.println(i);
}
}
}
the program is as follows
___________________________________________________________
import java.io.*;
class doubleval
{
public static void main()throws IOException
{
DataInputStream dt=new DataInputStream(System.in);
System.out.println("Enter NUMBER WHOSE DOUBLE U WANT TO PRINT");
int n=Integer.parseInt(dt.readLine());
for(int i=n;i<=100;i=2*i)
{
System.out.println(i);
}
}
}
Answer: while(numInsects < 99) {
printf("%d ", numInsects);
numInsects = numInsects * 2;
}
printf("\n");
Explanation: