Skip to content

Commit c495bb0

Browse files
Added the OddEven Program
1 parent d4f6b3d commit c495bb0

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

OddEven.java

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#Program For Check Whether No Even OR Odd
2+
3+
import java.io.DataInputStream;
4+
import java.io.IOException;
5+
class OddEven
6+
7+
{
8+
public static void main(String args[])
9+
{
10+
int x=0;
11+
System.out.println("Program For Check Whether No Even OR Odd");
12+
DataInputStream t=new DataInputStream(System.in);
13+
try{
14+
System.out.println("Enter No");
15+
x=Integer.parseInt(t.readLine());
16+
}
17+
catch(IOException ioe)
18+
{
19+
}
20+
if(x%2==0)
21+
{
22+
System.out.println("No is Odd");
23+
}
24+
else
25+
{
26+
System.out.println("No is Even");
27+
}
28+
}
29+
}

0 commit comments

Comments
 (0)