Need help with Pascal

I haven't done programming in 4 years and am a very rusty. Can someone help me, this is a homework assignment?
I need to develop a program that receives as input the student name, form class and number of books borrowed for each student with loans during the month of October 2010. I also have to determine who received the prize. My output is the student name, form class, the number of books that he/she borrowed and the date that the prize is presented. the output must be shown on screen in the form of a certificate.
This what i have done so far:

var
STUDENTNAME:array[1..10] of string;
FORMCLASS:array[1..10] of string;
BOOKSBORROWED:array[1..10] of integer;
highest: integer;
i:integer;
highpos:integer;
date:string;


{$IFDEF WINDOWS}{$R newbooksbooksborrowed.rc}{$ENDIF}

BEGIN
highest:=0;
for i:= 1 to 10 do
begin
writeln ('Please enter student name');
readln (STUDENTNAME[i]);
writeln ('Please enter the student form');
readln (FORMCLASS[i]);
writeln ('Please enter the number of books borrowed');
readln (BOOKSBORROWED[i]);
end;
for i:= 1 to 10 do
begin
IF BOOKSBORROWED[i]> highest THEN
highest := BOOKSBORROWED[i];
highpos:=i;
end;
readln (date);
writeln ('THIS CERTIFICATE IS AWARDED TO');
writeln ('________',STUDENTNAME[highpos]);
writeln ('________',FORMCLASS[highpos]);
writeln ('FOR THE MOST NUMBER OF BOOKS BORROWED DURING THE MONTH OF OCTOBER:',BOOKSBORROWED[highpos]);
writeln ('This Award is presented on:',date)
END.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories