Skip to main content
4 bytes shaved off by @Pietu1998
Source Link
karhell
  • 421
  • 2
  • 8

Befunge : 1515 11 bytes / 2 versions = 5.5

4 bytes shaved off by @Pietu1998

99*62*+;.@;5+."89",;5-;,@ 

Try it online :
Befunge 93Befunge 93
Befunge 98Befunge 98
Uses the Befunge 98-exclusive semicolon operator ("skip to next semicolon") to differentiate versions. Both will print "9". Befunge 93 will simply ignore the first semicolonsemicolons, subtract 5 from "8" (value left on top of the stack), print 93the resulting "3" and terminate. Befunge 98 on the other hand, will skip over, add 5 to 93, print the result"8" and terminate.

Befunge : 15 bytes

99*62*+;.@;5+.@ 

Try it online :
Befunge 93
Befunge 98
Uses the Befunge 98-exclusive semicolon operator ("skip to next semicolon") to differentiate versions. Befunge 93 will simply ignore the first semicolon, print 93 and terminate. Befunge 98 on the other hand, will skip over, add 5 to 93, print the result and terminate.

Befunge : 15 11 bytes / 2 versions = 5.5

4 bytes shaved off by @Pietu1998

"89",;5-;,@ 

Try it online :
Befunge 93
Befunge 98
Uses the Befunge 98-exclusive semicolon operator ("skip to next semicolon") to differentiate versions. Both will print "9". Befunge 93 will ignore the semicolons, subtract 5 from "8" (value left on top of the stack), print the resulting "3" and terminate. Befunge 98 on the other hand, will skip over, print "8" and terminate.

Source Link
karhell
  • 421
  • 2
  • 8

Befunge : 15 bytes

99*62*+;.@;5+.@ 

Try it online :
Befunge 93
Befunge 98
Uses the Befunge 98-exclusive semicolon operator ("skip to next semicolon") to differentiate versions. Befunge 93 will simply ignore the first semicolon, print 93 and terminate. Befunge 98 on the other hand, will skip over, add 5 to 93, print the result and terminate.