My Task is....(this is in pascal code by the way i am using a software called pascal7)
Produce a program that:
*reads in, from a text file, the names and dates of birth of 5 people
*stores these names and dates of birth using a sensible data structure
*determines which person is the oldest
*writes to the screen the name and age (in years) of the oldest person.
My text file i wrote in windows notepad heres whats in it:
Rachel Aspinall
7/01/1993
Heather Aspinall
28/12/1990
Laura Prescott
17/02/1991
Simon Jenkins
20/03/1991
Ross Harrison
30/02/1990
And heres my code ive written in pascal so far:
program Project1;
{$APPTYPE CONSOLE}
uses
SysUtils;
var
FileA:TextFile;
s: string;
begin
Assign(FileA,'PeopleInformation.txt');
Reset(FileA);
while not EOF(FileA) do
begin
Readln(FileA,s);
end;
end.
The code ive written so far is the first bullet point can someone help me with the other bullet points im desperate! i spent 5 hours on it yesterday and didnt get anywere i know i have to do an array i just dont know were to start please help