Computer Science, asked by matangidevi198597, 5 months ago

write about program in Java
i)to find an entered number is odd or even ​

Answers

Answered by mishrabk110282
4

Answer:

import java.util.*;

class OddEven

{

public static void main(String args[])

{

int i , n ;

Scanner sc = new Scanner(System.in);

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

n=sc.nextInt();

for(i=1;I less than n ; i++)

{

if(i%2==0)

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

else

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

}

}

}

Answered by VanshSayaniBaalveer
16

Thankyou di................

Similar questions