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