Skip to content

Instantly share code, notes, and snippets.

@roblogic
Created November 7, 2022 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roblogic/9b14ffe529ca360aef343f9165cedac6 to your computer and use it in GitHub Desktop.
Save roblogic/9b14ffe529ca360aef343f9165cedac6 to your computer and use it in GitHub Desktop.
fizzbuzz in gfortran (145 bytes), for code golf challenge https://codegolf.stackexchange.com/a/254203/15940
character(8)s;do i=1,100;s=''
if(mod(i,3)<1)s='fizz';if(mod(i,5)<1)s=trim(s)//'buzz'
if(s>'')then;print'(A)',s;else;print'(i0)',i;endif;enddo;end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment