program main
!
! Sample program of AND and OR in IF conditions
! Leap Year Program
!
implicit none
integer :: y
write(*,*) 'Input Year'
read(*,*) y
if(mod(y,400)==0 .or. (mod(y,4)==0 .and. mod(y,100)/=0)) then
write(*,*) 'Year',y,'is a leap year.'
else
write(*,*) 'Year',y,'is not a leap year.'
end if
end program main
¼Â¹Ô·ë²Ì