write about program in Java
i)to find an entered number is odd or even
Answers
Answered by
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
16
Thankyou di................
Similar questions
Physics,
2 months ago
Science,
2 months ago
Political Science,
2 months ago
English,
5 months ago
India Languages,
11 months ago
Math,
11 months ago