
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");
}
}
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.