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);
}
}
}
Answer: 3
Explanation:
Because X = 18 and our condition given to the code if > and < which do not match with the input so it prints 3.