Good day,
Firstly, I am new to pascal, I am only trying to assist my brother.
I am faced with a problem of adding data to arrays and I may need some help searching the array as well.
The program is suppose to allow the user to enter the name, status and country of origin and with this data perform some calculations which I think i can figure out once am past this step. The user must also set the arrays in a way that when they search they bring up the information of the user.
Below is what I have thus far.
program tourismworkshop;
uses crt;
const
hotel = 280.80;
tax = 55.00;
psub = 500.00;
pasub = 400.00;
var
nm: integer;
names: array[1..6] of string;
stat: integer;
status: array[1..6] of string;
coo: integer;
country: array[1..6] of string;
begin
write ('Tourism Workshop');
for nm:= 1 to 6 do
begin
write('Enter Name ');
readln(names[nm]);
end;
begin
write('Enter status ');
readln(status[stat]);
end;
begin
write('Enter country of origin ');
readln(country[coo]);
end;
write ('Displaying tourism workshop database ');
for nm:= 1 to 6 do
begin
write('The information stored ')
writeln(names[nm]);
writeln(status[stat]);
writeln(country[coo]);
end;
end.