Pascal Programming

Discussion in 'Software' started by pixthon64, Feb 1, 2011.

  1. pixthon64

    pixthon64 Private E-2

    Need help with Pascal Programming using Lazarus

    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);
    writeln ('Please enter the student form');
    readln (FORMCLASS);
    writeln ('Please enter the number of books borrowed');
    readln (BOOKSBORROWED);
    end;
    for i:= 1 to 10 do
    begin
    IF BOOKSBORROWED> highest THEN
    highest := BOOKSBORROWED;
    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.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds