Fizz Buzz in Fortran

Published on 28 April 2022 (Updated: 25 September 2022)

Fizz Buzz in Fortran

Welcome to the Fizz Buzz in Fortran page! Here, you'll find the source code for this program as well as a description of how the program works.

Current Solution

program fizz_buzz
        integer :: i

        do i = 1,100
                if ((modulo(i,3) == 0) .and. (modulo(i,5) == 0)) then 
                        write (*,'(a)') "FizzBuzz"
                else if (modulo(i,3) == 0) then
                        write (*,'(a)') "Fizz"
                else if (modulo(i,5) == 0) then
                        write (*,'(a)') "Buzz"
                else
                        write (*,'(I0)') i
                end if
        end do
        
end program fizz_buzz

Fizz Buzz in Fortran was written by:

If you see anything you'd like to change or update, please consider contributing.

How to Implement the Solution

No 'How to Implement the Solution' section available. Please consider contributing.

How to Run the Solution

No 'How to Run the Solution' section available. Please consider contributing.