Question: ***PROGRAMMING LANGUAGE USED: FORTRAN*** QU. 2. Check if a year is a leap-year, for several years, terminating with year 9999. A year is a leap-year

***PROGRAMMING LANGUAGE USED: FORTRAN***
QU. 2. Check if a year is a leap-year, for several years, terminating with year 9999. A year is a leap-year if it is divisible by 4, unless it is a century (but if it is divisible by 400 then it still IS a leap-year). HINTS: To check whether an integer variable K is divisible by L use IF ((K/L)*L--K) THEN ! SET A POINTER END IF (For if K is not a multiple of L, K/L is rounded down to the next lower integer, eg. 5/3 gives l, so (5/3)*3=3, not 5). You must test all possibilities (normal leap-year, normal non-leap-year, mul- tiple of 100 but not 400, multiple of 400)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
