Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Bounty
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Check The Given Number is Odd or Even using Java
WhatsApp
Senthilvelan Sambamoorthy
Aug 13
2016
714
0
0
ssvoe.rar
// odd or even
import
java.io.*;
class
ssvoe
{
public
static
void
main(String arg[])
throws
IOException
{
String s1;
int
n1;
DataInputStream dr =
new
DataInputStream(System.in);
System.out.print(
"\nEnter the Number : "
);
s1 = dr.readLine();
n1 = Integer.parseInt(s1);
if
(n1 %
2
==
1
)
System.out.println(
"\nThe Number is ODD"
);
else
System.out.println(
"\nThe Number is EVEN"
);
}
}
Java
Up Next
Check The Given Number is Odd or Even using Java