Write a JAVA program to check a year is a leap year or not.
Answers
Answered by
8
hiii friend
here is your answer
class leap_year
{ psvm (int a)
{
sopln ("year="+a);
if (a%4==0)
sopln ("the" + a +" is a leap year");
else
sopln ("the" + a +"is not a leap year");
}
}
here we have divided ''''a"'' modululated (modulus) by 4 because the leap years are divisible by 4
glad to help you
hope it helps
thank you.
here is your answer
class leap_year
{ psvm (int a)
{
sopln ("year="+a);
if (a%4==0)
sopln ("the" + a +" is a leap year");
else
sopln ("the" + a +"is not a leap year");
}
}
here we have divided ''''a"'' modululated (modulus) by 4 because the leap years are divisible by 4
glad to help you
hope it helps
thank you.
Anwesha111:
Thanks
Answered by
3
My answer is below
Now enjoy the program
Now enjoy the program
Attachments:
Similar questions