Create a program that finds out whether any year is a leap year or not. Make this as short as possible. The name HAS to be names "LEAP"
My Code
with an astonishing 42 bytes…
PROGRAM:LEAP
Input Y
Y/4
100fPart(Ans
If not(Ans
Y/100
0<10fPart(Ans
Code Break-Down
Y/4
After the user inputs the year, it divides the value by 4.
100fPart(Ans
Multiplies the value by 100, extracting the decimal place.
If not(Ans
Y/100
Checks whether to see if the answer is divisble by 4. If it is, check whether to see if the year input is divisible by 100.
0<10fPart(Ans
If the answer is greater than 0, it is a leap year. Else it is not.
This is what it looks like when running the program:
Hewwo, my name is Achak Claw. I was formerly BioHazard.