Write a program
Input five integers and check whether they are even Or odd numbers
Answers
Answered by
1
Answer:
import java.util.*;
class Numbers
{
static void main()
{
Scanner sc = new Scanner(System.in);
for (int i = 1; i <= 5; i++)
{
System.out.println("Input an integer");
int a = sc.nextInt();
if (a % 2 == 0)
System.oout.println("Even");
else
System.out.println("Odd");
}
}
}
Hope this helps u!! Pls mark as brainliest!
Similar questions