Skip to content

Instantly share code, notes, and snippets.

@rinx
Last active August 29, 2015 14:04
Show Gist options
  • Save rinx/e98eb37548e478f553cd to your computer and use it in GitHub Desktop.
Save rinx/e98eb37548e478f553cd to your computer and use it in GitHub Desktop.
fizzbuzz with fortran95
program main
integer :: i
do i = 1, 100
if (mod(i, 15) == 0) then
print *, "FizzBuzz"
elseif (mod(i, 5) == 0) then
print *, "Buzz"
elseif (mod(i, 3) == 0) then
print *, "Fizz"
else
print *, i
endif
end do
end program main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment