Learn

Some languages use a native Math object for advanced operations on numbers. LOLCODE doesn’t have an advanced mathematics object.

Still, it does support two of the more common math functions from other languages. It provides a BIGGR OF operator for finding the greater of two numbers and a SMALLR OF operator for finding the lesser of two numbers.

BIGGR OF 3 AN 4 BTW 4 SMALLR OF 4 AN 3 BTW 3

Let’s create another program that operates on two numbers. This time we’ll be using those two operators.

Instructions

1.

Create two variables, brian and steve, read them in from user input, and convert them to floating-point numbers.

2.

Print on one line the larger of those two numbers.

3.

Print on another line the smaller of those two numbers.

Take this course for free

By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.
Already have an account?