!> !! @brief Fortranの入出力テストとしてFizzBuzzを行います !! @date 2016/05/05 !! program main implicit none integer :: n, i read(*,*) n do i = 1, n if (mod(i, 15) .eq. 0) then write(*, '(A)') 'FizzBuzz' else if (mod(i, 3) .eq. 0) then write(*, '(A)') 'Fizz' else if (mod(i, 5) .eq. 0) then write(*, '(A)') 'Buzz' else write(*, '(I0)') i end if end do end program main