!> !! @brief Fortranの入出力テストとしてFizzBuzzを行います !! @date 2016/05/05 !! program main implicit none integer :: n, i !read(*,*) n n = 100 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