- 3

write a programme in java to check wheather the number is even or odd

use int use if and else statment

3rd Nov 2017, 1:04 AM
Devanand Bilsi
Devanand Bilsi - avatar
2 Réponses
+ 3
int n=3; if(n%2==0) System.out.println("Even"); else System.out.println("Odd");
3rd Nov 2017, 1:44 AM
Chriptus13
Chriptus13 - avatar
+ 11
Do your homework yourself. It's very easy.
3rd Nov 2017, 4:34 PM
Swapnil Srivastava
Swapnil Srivastava - avatar