Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

##QBIC , 12 bytes

QBIC , 12 bytes

::?a'\`b,a%b

Explanation:

:: Gets two integers from the command line, a and b
? PRINT
 a'\`b Integer division in QBasic is '\', however, '\' is the command for ELSE in QBIC
 To tell QBIC not to swap in ELSE at the '\', we need a code literal.
 Everything from the ' to the `is passed on to QBasic without being parsed.
 ,a%b Also print a MOD b

##QBIC , 12 bytes

::?a'\`b,a%b

Explanation:

:: Gets two integers from the command line, a and b
? PRINT
 a'\`b Integer division in QBasic is '\', however, '\' is the command for ELSE in QBIC
 To tell QBIC not to swap in ELSE at the '\', we need a code literal.
 Everything from the ' to the `is passed on to QBasic without being parsed.
 ,a%b Also print a MOD b

QBIC , 12 bytes

::?a'\`b,a%b

Explanation:

:: Gets two integers from the command line, a and b
? PRINT
 a'\`b Integer division in QBasic is '\', however, '\' is the command for ELSE in QBIC
 To tell QBIC not to swap in ELSE at the '\', we need a code literal.
 Everything from the ' to the `is passed on to QBasic without being parsed.
 ,a%b Also print a MOD b
Source Link
steenbergh
  • 8.2k
  • 1
  • 27
  • 43

##QBIC, 12 bytes

::?a'\`b,a%b

Explanation:

:: Gets two integers from the command line, a and b
? PRINT
 a'\`b Integer division in QBasic is '\', however, '\' is the command for ELSE in QBIC
 To tell QBIC not to swap in ELSE at the '\', we need a code literal.
 Everything from the ' to the `is passed on to QBasic without being parsed.
 ,a%b Also print a MOD b

AltStyle によって変換されたページ (->オリジナル) /