Skip to main content
added 131 characters in body
Source Link
roblogic
  • 4k
  • 18
  • 23

Fortran (GFortran), 145 138 134 128145 138 134 128 125 bytes

character*8s;docharacter*8s;do5 i=1,100;s=''
if(mod(i,3)<1)s='fizz'
if(mod(i,5)<1)s=trim(s)//'buzz'
if(s=='')write(s,'(i0)')i
5 print*,s
enddo
end

Try it Online!   134b 138b 145bTry it Online!

On line 4 we write the current value of i into the string s. This greatly simplifies the subsequent print statement.
128b 134b 138b 145b

Fortran (GFortran), 145 138 134 128 bytes

character*8s;do i=1,100;s=''
if(mod(i,3)<1)s='fizz'
if(mod(i,5)<1)s=trim(s)//'buzz'
if(s=='')write(s,'(i0)')i
print*,s
enddo
end

Try it Online!   134b 138b 145b

On line 4 we write the current value of i into the string s. This greatly simplifies the subsequent print statement.

Fortran (GFortran), 145 138 134 128 125 bytes

character*8s;do5 i=1,100;s=''
if(mod(i,3)<1)s='fizz'
if(mod(i,5)<1)s=trim(s)//'buzz'
if(s=='')write(s,'(i0)')i
5 print*,s
end

Try it Online!

On line 4 we write the current value of i into the string s. This greatly simplifies the subsequent print statement.
128b 134b 138b 145b

deleted 2 characters in body
Source Link
roblogic
  • 4k
  • 18
  • 23

Fortran (GFortran), 145 138 134 129128 bytes

character*8 s;docharacter*8s;do i=1,100;s=''
if(mod(i,3)<1)s='fizz'
if(mod(i,5)<1)s=trim(s)//'buzz'
if(s=='')write(s,'(i0)')i
print*,s
enddo
end

Try it Online!Try it Online!   134b 138b 145b

On line 4 we write the current value of i into the string s. This greatly simplifies the subsequent print statement.

Fortran (GFortran), 145 138 134 129 bytes

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=='')write(s,'(i0)')i
print*,s
enddo
end

Try it Online!   134b 138b 145b

On line 4 we write the current value of i into the string s. This greatly simplifies the subsequent print statement.

Fortran (GFortran), 145 138 134 128 bytes

character*8s;do i=1,100;s=''
if(mod(i,3)<1)s='fizz'
if(mod(i,5)<1)s=trim(s)//'buzz'
if(s=='')write(s,'(i0)')i
print*,s
enddo
end

Try it Online!   134b 138b 145b

On line 4 we write the current value of i into the string s. This greatly simplifies the subsequent print statement.

another 5!
Source Link
roblogic
  • 4k
  • 18
  • 23

Fortran (GFortran), 145 138 134 134129 bytes

character*8 s;do i=1,100
write(s,'(i0)')i100;s=''
if(mod(i,3)<1)s='fizz'
if(mod(i,5)<1)s='buzz's=trim(s)//'buzz'
if(mods=='')write(is,15'(i0)<1')s='fizzbuzz'i
print*,s
enddo
end

Try it Online!Try it Online!   134b 138 bytes138b      145 bytes145b

On line 24 we write the current value of i into the string s. This greatly simplifies the subsequent print statement.

When the Gnu compiler implements ternaries (expressional IF) we might be able to save more bytes.

Fortran (GFortran), 145 138 134 bytes

character*8 s;do i=1,100
write(s,'(i0)')i
if(mod(i,3)<1)s='fizz'
if(mod(i,5)<1)s='buzz'
if(mod(i,15)<1)s='fizzbuzz'
print*,s
enddo
end

Try it Online!   138 bytes    145 bytes

On line 2 we write the current value of i into the string s. This greatly simplifies the subsequent print statement.

When the Gnu compiler implements ternaries (expressional IF) we might be able to save more bytes.

Fortran (GFortran), 145 138 134 129 bytes

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=='')write(s,'(i0)')i
print*,s
enddo
end

Try it Online!   134b 138b  145b

On line 4 we write the current value of i into the string s. This greatly simplifies the subsequent print statement.

added 555 characters in body
Source Link
roblogic
  • 4k
  • 18
  • 23
Loading
added 21 characters in body
Source Link
roblogic
  • 4k
  • 18
  • 23
Loading
Source Link
roblogic
  • 4k
  • 18
  • 23
Loading