Similarly, LOLCODE supports equivalents of the * and / operators:

BTW Multiplication PRODUKT OF x AN y BTW Division QUOSHUNT OF x AN y

These follow the same rules as adding or subtracting: if either is already a NUMBAR, the result is too; otherwise, the result is a NUMBR.

For dividing, if both numbers are NUMBRs, any remainder will be truncated, like when converting from a NUMBAR to a NUMBR.



Print out the result of multiplying 3 and 4.


Create a variable named capacity equal to 9.


Create a variable named roughCapacity equal to capacity divided by 2 and print it out. Note how the number is rounded to the nearest integer.


Create a variable named exactCapacity, and this time use a floating point NUMBAR to set it to the result of dividing capacity in two.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?