TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Calculate Leap Year Using Java
Senthilvelan Sambamoorthy
Aug 13
2016
Code
676
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
ssva23.rar
/* LEAP YEAR */
import
java.io.*;
import
java.lang.*;
class
ssva23
{
public
static
void
main(String arg[])
throws
IOException
{
BufferedReader obj=
new
BufferedReader(
new
InputStreamReader(System.in));
System.out.println(
"\n LEAP YEAR"
);
System.out.println(
" ---- ----"
);
System.out.print(
"\nENTER THE YEAR : "
);
int
year=Integer.parseInt(obj.readLine());
if
(year%
4
==
0
)
{
System.out.println(
"\nTHE GIVEN YEAR IS LEAP YEAR"
);
}
else
{
System.out.println(
"\nTHE GIVEN YEAR IS NOT LEAP YEAR"
);
System.out.println(
"\n"
);
}
}
}
Java