AboutAlex Barry Expertise I have been a qbasic programmer since 2000, creating games, minor libraries and various small programs. I have experience using interrupts, graphics, file input/output, the mouse cursor, and using libraries. I have also learned FreeBASIC, c/c++, python, php and html.
I do not claim to be an absolute authority in any language, but I don't mind looking things up and learning with you.
Experience Hobby programming since 2000
I no longer belong to any community programming groups, but do have knowledge of *basic dialects and C/C++
Question I need to know how to write a leap year program on quickbasic but i cant figure it out will someone write the code so i can see how to write it?
To move this into QBasic, it's easiest to make it into a function:
DECLARE FUNCTION IsLeapYear%( year AS INTEGER )
FUNCTION IsLeapYear%( year AS INTEGER )
' First, assume it is not a leap year
IsLeapYear% = 0
IF (year MOD 4) = 0 THEN
IF (year MOD 100) = 0 THEN
IF (year MOD 400) = 0 THEN
IsLeapYear% = 1
END IF
END IF
END IF
END FUNCTION