You're using the QBASIC program that came with MSDOS, right?
Don't you have the help file that accompanies QBASIC? There's an example program for RND that's right there in the RND function reference page.
You should have these 3 files:
QBASIC.EXE
QBASIC.INI
QBASIC.HLP
(You can specify where the QBASIC.HLP file is located in the QBASIC 'Options' menu. Don't put QBASIC in a folder that uses a name that is longer than 8 characters and don't put any space characters in the name. A safe place to put QBASIC is in the C:\Windows" directory.)
Anyway, if you don't have the help file:
The first thing you need to do is to use the RANDOMIZE statement to seed the pseudo-random number generator. (The typical pseudo-random number generator code is usually a simple mathematical algorithm using a 'seed' number and another number.)
You can specify a seed number for RANDOMIZE, but it would be better to use the TIMER function to provide the seed number because the TIMER value will be different with every execution of your program. If your seed number is constant, then your program will always generate the same 'random' numbers on every program execution.
Next, you have to use the RND function, which only generates a floating point random number between 0 and 1. In order to get the RND function to generate a number between the values that you want, you need to 'adjust' the output of the RND function. Usually, you don't want a floating point number, so you need to use the INT statement.
rem x= a random integer between 0 and 7
randomize timer
x=int (rnd(1) * 8)
rem x= a random integer between 1 and 8
randomize timer
x=1 + int (rnd(1) * 8)
rem x= a random integer between 1400 and 2000
randomize timer
x=1400 + int(rnd(1) * 601)
If the random number that you get tends to mostly stay within a small range of numbers, then try using 2 RND lines or develop some kind of algorithm like making even numbers go through an extra RND line (or whatever).