We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d4f6b3d commit c495bb0Copy full SHA for c495bb0
1 file changed
OddEven.java
@@ -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