Explanation
MOD Arithmetic Operator
Divides one number by another and returns the remainder.Worth knowing
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
numeric-expression1 MOD numeric-expression2 |
numeric-expression1 numeric-expression2 |
Any numeric expressions. Real numbers are rounded to integers. |
PRINT 19 MOD 6.7 'QBasic rounds 6.7 to 7, then divides.
'Output is: 5