Write a program that accepts a student’s name, form class, and number of books borrowed for the month of October. Determine the name of the student that has borrowed the most amount of books during the month of October and displays in certificate-form the student with the highest number of books borrowed for that period’s name, form class, the number of books borrowed and the date that the certificate is to be given.

using three arrays we have to construct a documented PASCAL Program


Program October_Loans; //name of the program
//variable declaration
Var
Name: array [1…10] of string; //declaring an array variable of type string that will be used to store the students’ names
Date: array [_____] of______; // declaring an array variable of type _____ that will be used to store the dates of borrowed books
Books: array [____] of integer; // declaring an array variable of type integer that will be used to store the number of borrowed books per student
Total _Books: integer; //declaring a variable named Total _Books of type integer
Highest_Books: integer; //declaring a variable named Highest_Books of type integer
//end of variable declaration
//constant declaration
Const
October: =10; // a constant called October is assigned the value of 10
// end of constant declaration
BEGIN // this marks the beginning of the actual program
//the following is to initialize the variables
Total _Books:=0; //this assigns the value zero to the variable Total _Books
Highest_Books:=0; //this assigns the value zero to the variable Highest_Books
For a: = 1 to 10 do //this loop assigns the array called Name to an empty string
Begin
Name [a]: =” “;
End;
For b: = __to__do // this loop assigns the array called Date to an _________
Begin
Date :=___;
End;
For c: =__to__do; // this loop assigns the array called Books to the value zero
Books[c]: =0;
End;
//end of initializing
Repeat //beginning of repeat until loop
Read (Name, Date, Books); //allows the computer to read values from a source
If (Date==October) and (Books<>Books) then //this selection statement determines if the Date is equal to October and the book does not have the same title
Total _Books:= Total _Books+1 //this statement depending on if the selection is positive then one is added to the total number of books

that is all i have so far but where the dashes are i am kind of lost as to what data type to put for the date also the test data is 10 so maybe that might help

can you help me please

This article has been dead for over six months. Start a new discussion instead.