Bus Route Program Problem - Programmers Heaven

#### Howdy, Stranger!

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

#### Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

# Bus Route Program Problem

Posts: 2Member
Hi there,

I have been asked to create a bus route program.

It has CHILD ADULT OAP (returns also for all)

Here is my code currently

PROGRAM Bus;

USES WinCrt;

VAR

stops : ARRAY [1..8] of INTEGER;
child : ARRAY [1..8] of REAL;
adult : ARRAY [1..8] of REAL;
oap : ARRAY [1..8] of REAL;
date : CHAR;
LOOP : INTEGER;
ON : INTEGER;
OFF : INTEGER;
totalprice : REAL;
class : CHAR;
PRICE : REAL;

BEGIN
child[1] := 0.70;
child[2] := 0.80;
child[3] := 0.75;
child[4] := 1.10;
child[5] := 0.75;
child[6] := 1.40;
child[7] := 1.55;
child[8] := 0.50;

oap[1] := 0.75;
oap[2] := 0.85;
oap[3] := 0.80;
oap[4] := 1.20;
oap[5] := 0.80;
oap[6] := 1.55;
oap[7] := 1.75;
oap[8] := 0.65;

Writeln('What is todays date? ');
clrscr;

FOR LOOP := 1 to 10 DO

BEGIN
Writeln('What stop are you getting on? ');

Writeln('What stop are you getting off? ');

Writeln('Are you an Adult, Child , OAP?' ,' A, C, O? ');

IF class = 'A'

THEN BEGIN

END;

IF class = 'C' then begin

Writeln('Child');

END;

IF class = 'O'

THEN BEGIN

Writeln('OAP')

END;

END;

END.