Skip to content

Instantly share code, notes, and snippets.

@mrdoornbos
Created May 27, 2024 17:59
Show Gist options
  • Save mrdoornbos/0aef0c20773273051c2ef248a5844297 to your computer and use it in GitHub Desktop.
Save mrdoornbos/0aef0c20773273051c2ef248a5844297 to your computer and use it in GitHub Desktop.
classic 10 print in gfortran, just for the haters
program ten_print
implicit none
integer :: i, j
integer, parameter :: n = 40
call random_seed()
do i = 1, n
do j = 1, n
if (rand() < 0.5) then
write(*, "(A)", advance="no") "/"
else
write(*, "(A)", advance="no") "\"
end if
end do
write(*,*) ""
end do
end program ten_print
real function rand()
real :: r
call random_number(r)
rand = r
end function rand
@mrdoornbos
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment