Computer Science, asked by deathprincess6109, 11 months ago

Input a year.Display the message “LEAP YEAR “ If the entered year has 366 days, other wise Display the message “NOT A LEAP YEAR “.

Answers

Answered by phani7gpc7jby
3
So in general leap year is found by dividing with 4
If year is divisible by 4 then its leap year.

Input year;
If(year/4==0)
{pf("leap year");}
Else
{pf("not a leap year");}

But if u need that "program to check according to number of days in year entered" then we should manually store number of days in storage or we should write a logic stating each year entered has 0.25 day extra which should be added.

So divisible by 4 is better
Answered by ayushiisinghh03
0

Answer:

answer is in the picture.

Attachments:
Similar questions