In this java program we are going to
check even number using if else.
//odd even program
class IfElse6{
public static void main(String args[]){
int a=-3;
if(a%2==0) {
System.out.println("The numbere is even");
}
else {
System.out.println("The number is odd");
}
}
}
//odd even program
class IfElse6{
public static void main(String args[]){
int a=-3;
if(a%2==0) {
System.out.println("The numbere is even");
}
else {
System.out.println("The number is odd");
}
}
}
No comments:
Post a Comment