Im working on two homework assignments at once my next assignment is to
Use a FOR/NEXT loop to total the numbers from 1 through 100. Print the numbers on the screen.
Here is what I have so far....
DIM X AS INTEGER
CLS
FROM X = 1 TO 100
RANDOMIZE TIMER
PRINT (RND * 100);
NEXT X
The program Im having when i try to run this program is that i get an "expected end-of-statement" error on "TO". Why would this be?
FOR/NEXT program question
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
Code: Select all
CLS
RANDOMIZE TIMER
FOR X = 1 TO 100
PRINT (RND * 100);
NEXT X
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
-
- Coder
- Posts: 42
- Joined: Mon Sep 03, 2012 4:32 pm