Menu
Question Index
...


Arrange the following such that the program prints the average of all even numbers till the input number. In this case input is 20. Unselect any unwanted statements using the check box.

  • move     System.out.println(output);
  • move             evenNumberCount++;
            }
  • move     int input = 20, output = 0, evenNumberCount = 0;
  • move         if( i % 2 == 0) 
            {    
                output += i;
  • move         i++;
        }
  • move     int i = 0;

        while(i <= input)
        {
  • move     output /= evenNumberCount;

Doubts

Problems

Topic: while Loop In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App