Computer Science, asked by nonprocastinator, 4 months ago

State the output:
for(int i = 0; ++i<=5; i+=1/2.0)
System.out.println(i+"=");

please give step wise execution ​

Answers

Answered by gunjotsingh0909
0

Explanation:

output is 1

because first I value is 1 .

and then equation is that i is less than 5. this is true. than i value is add with 1 and divide by 2.0 . then i value is 1 .and system out.println is i . so i value is 1 so output is also 1.

please mark my answer as brainlist.

Attachments:
Similar questions