added a couple more exercises
This commit is contained in:
29
qb64/cascading-numbers2.bas
Normal file
29
qb64/cascading-numbers2.bas
Normal file
@@ -0,0 +1,29 @@
|
||||
REM Cascading numbers 2.0
|
||||
REM by John Paul Wohlscheid
|
||||
|
||||
REM ask for numbers
|
||||
PRINT "Please enter twn numbers and watch the values cacade"
|
||||
INPUT "Enter your first number: "; num1%
|
||||
INPUT "Enter your second number: "; num2%
|
||||
INPUT "Enter your third number: "; num3%
|
||||
INPUT "Enter your fourth number: "; num4%
|
||||
INPUT "Enter your fifth number: "; num5%
|
||||
INPUT "Enter your sixth number: "; num6%
|
||||
INPUT "Enter your seventh number: "; num7%
|
||||
input "Enter your eighth number: "; num8%
|
||||
INPUT "Enter your ninth number: "; num9%
|
||||
INPUT "Enter your tenth number: "; num10%
|
||||
|
||||
ab% = num1% - num2%
|
||||
cd% = num3% - num4%
|
||||
ef% = num5% - num6%
|
||||
gh% = num7% - num8%
|
||||
ij% = num9% - num10%
|
||||
finalnum% = ab% - cd%
|
||||
|
||||
REM displaying numbers while using str$ to convert numbers to strings
|
||||
CLS
|
||||
PRINT STR$(num1%) + " " + STR$(num2%) + " " + STR$(num3%) + " " + STR$(num4%) + " " + STR$(num5%) + " " + STR$(num6%)
|
||||
|
||||
|
||||
PRINT "=========================================================="
|
||||
Reference in New Issue
Block a user