Answer :
Answer:
The correct answer to this question is: "this program give an error".
int i = 7; //declare a variable(i) and assign value.
while (i>=2) //use loop and check condition.i greater then equal to 2.
{
System.out.print (i +""); //print value of i.
if ((i%3) == 0) //hold remainder
{
i +2; //error.
}
else
{
i/=2; //hold Quotient
}
}
Explanation:
In the above program, there is an error in the if block because it is not the correct way to declare. To use the variable from the correct output we use a variable like this.
Example
int i = 7;
//declare a variable(i) and assign value.
while (i>=2)
//use loop and check condition.i greater then equal to 2.
{
System.out.print (i +""); //print value of i.
if ((i%3) == 0) //hold remainder
{
i =i+2;
}
else
{
i/=2; //hold Quotient
}
}
Output: 732