http://www.selectservices.co.uk/?propeler=opzioni-binarie-ricarica-con-paypal&aee=a7 opzioni binarie ricarica con paypal A number is said to be even if it is divisible by 2.  otherwise odd.

waltham watches dating Let us now see an example of a java program to determine whether the given number is an odd or even number.

Algorithm:

Questo perché in quel momento RSI si trova in una zona di ipercomprato sopra 80 see e ipervenduto sotto i 20.. , cashback, Step 1: Start.

http://celebritysex.cz/?triores=lds-free-dating-websites&bc7=45 Step 2:  Read n.

q option binario Step 3:  if n%2 == 0, then print n is even.

http://creatingsparks.com.gridhosted.co.uk/?56c=83 Step 4: else print n is odd.

click here Step 5: Stop.

Source code:

go

http://senslite.com.tw/?alergolog=iqoption-com-account-activate-34dad65fc042ab60b8fb9c3967485e58&9b5=b2

Explanation:

click In the program, integer entered by the user is stored in variable num.

Then, whether the number is perfectly divisible by 2 or not is checked using modulus operator.

If the number is perfectly divisible by 2, test expression num%2 == 0  evaluates to 1 (true) and the number is even.

However, if the test expression evaluates to 0 (false), the number is odd.

Output:

C:\Users\santo\Desktop\new>javac Even.java

C:\Users\santo\Desktop\new>java Even

*** www.programmingposts.com ***

<< JAVA Program to check whether the given number is even or not >>

Enter number:
9
9 is odd

Screenshot of output:

Screenshot of output

Leave a Reply

Your email address will not be published. Required fields are marked *