You are on page 1of 1

Practical 3

import java.util,*;

public class Evenodd{

public static void main(String args[]){

Scanner sc= new Scanner(System.in);

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

int x=sc.nextInt();

if(x%2==0){

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

e;se{

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

Output

Enter a number

Number is even

You might also like