Computer Science, asked by ishaminj020, 9 months ago

Find output of the following code.
int i=1;
while (i<5)
{
System.out.println(i++);
i = i * 2;
}​

Answers

Answered by tiger009
0

Java Programming Language

Output:

1

4

Explanation:

In the following program which is written in the Java Programming Language.

  • Set the integer data type variable 'i' and initialize it to 1.
  • The set the while loop statement that iterates from 1 and ends at less than 5 which is 4.
  • Then, print the variable 'i' and increment that variable by 1, then multiply it from 2 and then it prints 4.

Learn More:

https://brainly.in/question/11781728

Answered by arnimaanuragmishra
1

Answer:

Resolve to perform what you ought; perform without fail what you resolve.

Similar questions