Table of Contents
Overview
Below is the program to find the smaller number among any two user-entered numbers.
REM Program to find the smaller number among two numbers CLS INPUT "Enter the first number: "; a INPUT "Enter the second number: "; b IF a < b THEN PRINT a; " is smaller than ";b ELSE PRINT b; " is smaller than ";a END IF END
Output
Explanation
To find the smaller number among two numbers, ask two numbers from the user and check if the first number is smaller than the other using the less than (<) comparison operator.