program leap_year integer i write(*,*) "leap years are" do i = 1900,2005 call leap(i) enddo end subroutine leap(i) integer i if (MOD(i,4).eq.0) then if (MOD(i,100).ne.0) then goto 20 else if (MOD(i,400).eq.0) then goto 20 endif endif else goto 30 endif 20 write(*,*) i 30 return end