
Write a program that repeatedly reads an integer from the console. If the integer is odd, outputs "Odd Day" if the integer is even (and not 0), outputs â??Even now". if the integer is 0. exits program

import java.util.*;
class EvenOddDay
{
public static void main(String[] args)
{
Scanner input=new Scanner(System.in);
int num=-1;
while(num!=0){
System.out.print("Enter Number: ");
num=input.nextInt();
if(num==0){
System.exit(0);
}
if(num%2==0){
System.out.println("Even Day");
}
else{
System.out.println("Odd Day");
}
}
}
}