How to Loop Input Range then COUNT How Many EVEN or ODD using For, While, and Do While Loop in Java

Published: 15 March 2020
on channel: Tenoi TV
4,285
41

Hi guys! In this video I will show you how to solve one of our Java Looping Exercises using For, While, and Do While Loop.

Write Java program to allow the user to input range. Then the program will show the looped number and calculate the sum of all numbers. It will also count the number of even and odd numbers.

(Sample Output:)
Input range: 5

Number is 1
Number is 2
Number is 3
Number is 4
Number is 5

The sum is 15
Total odd number is 3
Total even number is 2


Check this :
using For Loop 04:56
using While Loop 12:22
using Do While Loop 15:08

(Note: I used Eclipse IDE for Java Developers - 2019-12 and also I'm using Scanner class to accept user input)

If you like this video DON'T FORGET TO LIKE AND SUBSCRIBE TO MY YOUTUBE CHANNEL to see more programming videos!!!

#java
#javaprogramming
#javaprogrammingwitheclipse
#countevenodd
#evenoddcounter
#loopgivenrangethencountevenodd
#loopinputrangethensumcountevenodd
#dmtenio
#tenoitv

You can also check this video:

How to Loop Input Range then Get the Sum of All Numbers using For, While, and Do While Loop in Java
   • How to Loop Input Range then Get the Sum o...  

How to Check if Given Integer is Even or Odd using If...Else Statement in Java
   • How to Check if Given Integer is Even or O...  

How to Check if Given Integer is Even or Odd using Switch Statement in Java
   • How to Check if Given Integer is Even or O...  


On this page of the site you can watch the video online How to Loop Input Range then COUNT How Many EVEN or ODD using For, While, and Do While Loop in Java with a duration of hours minute second in good quality, which was uploaded by the user Tenoi TV 15 March 2020, share the link with friends and acquaintances, this video has already been watched 4,285 times on youtube and it was liked by 41 viewers. Enjoy your viewing!