the program im trying to make will select a random movie from a list of movies and tell the user which 1 he should watch.
first the program will ask how many movies there are. it will then ask for the titles of each movie and then it will output a random movie.
this is what i have so far:
program Movie_Randomizinationer;
uses crt;
var
m:array[1..10] of string;
hm:integer;
c:integer;
ran:string;
begin
clrscr;
write('How many movies are there? ');
readln(hm);
c:=0;
repeat
clrscr;
c:=c+1;
writeln('Enter in title for movie ',c,':');
readln(m[c]);
until c=hm;
clrscr;
randomize;
ran:=m(random[1..hm]); {this is wrong and i dont know how to continue from here on}
writeln('You will be watching ');
writeln(ran);
readln;
end.
can anyone help please?