Now.. this is abit stupd but i'm just doing this for fun to learn.
Simba Code:
program FindStart;
const
NUMBER_PREF = 67;
LOWEST_NUM = 0;
HIGHEST_NUM = 1000;
procedure FindCalc;
begin
Writeln('Prepare for the answer...')
Wait(700)
Writeln('Anytime now!')
Wait(1700 + Random(420))
Writeln('The random number generated between ' + IntToStr(LOWEST_NUM) + ' and ' + IntToStr(HIGHEST_NUM) + ' is!')
Wait(3500 + Random(540))
if (Random(HIGHEST_NUM) < (NUMBER_PREF)) then
Writeln('Less Than ' + IntToStr(NUMBER_PREF) + '!')
else
Writeln('Greater Than ' + IntToStr(NUMBER_PREF) + '!');
end;
begin;
ClearDebug;
FindCalc;
end.
There is one part which I'm not sure what to do..
Simba Code:
if (Random(HIGHEST_NUM) < (NUMBER_PREF)) then
How can i generate Random Number between, HIGHEST_NUM and LOWEST_NUM ?
Edit: Oh, and what should I do to generate the random number the script has created?
So I could say that the number is not (NUMBER_PREF) but instead the random number given?
I might be on the right track with one of the problems but I may have approached it in the wrong way.
Simba Code:
if (RandomRange(StrToInt(HIGHEST_NUM),StrToInt(LOWEST_NUM) < (NUMBER_PREF))
or
if (RandomRange(HIGHEST_NUM;LOWEST_NUM) < (NUMBER_PREF)) then