Write a Java program to input a number and check whether is +ve odd or +ve even or -ve odd or -ve even or zero
Answers
Answered by
0
Answer:
zero
Explanation:
please mark as brain list
Answered by
1
Answer:
import java.util.Scanner;
public class Odd_Even
{
public static void main(String[] args)
{
int n;
Scanner s = new Scanner(System.in);
System.out.print("Enter the number you want to check:");
n = s.nextInt();
if(n % 2 == 0)
{
System.out.println("The given number "+n+" is Even ");
}
else
{
System.out.println("The given number "+n+" is Odd ");
}
}
}
I hope it will be helpful for you
please mark me as brainliest
Similar questions