Computer Science, asked by devikancha1989, 4 months ago

b) To determine whether the entered number is two digit and hence check whether it is
even or odd.
write java program​

Answers

Answered by kamalrajatjoshi94
0

Answer:

Program:-

import java.util.*;

public class Even_Odd

{

public static void main(String args[ ])

{

Scanner in=new Scanner(System.in);

int n;

System.out.println("Enter the number");

n=in.nextInt();

if(n%2==0)

System.out.println("The entered number is even");

else

System.out.println("The entered number is odd");

}

}

Answered by gulnazfatma093
0

Explanation:

see the attached image hope it helps you

Attachments:
Similar questions