CAN ANYONE HELP ME START WRITING THIS PROGRAM IN PASCAL.... I DONT KNOW HOW TO START WITH THE ARRAY AND ADDING VALUES...... PLEASE HELP
1. Declare 2 arrays a.Carmodel b. Category
2. Fill or populate the arrays within the program ie assign values to each position in the array, use the data from below.
3. Declare 3 constants: catA, catB and catC to hold 1000, 600 and 400 respectively.
HC NISP NISSB MITSL CHEV SUB MAZ PEUG MER
B B C C C B B B A
5. Rationale: the program starts and declares the 2 arrays and 3 constants and puts data in them .The user is then asked to enter the model of a car he can decide to enter END which should stop the program however if he enters any other value the program continues.
The program proceeds to check whether the user entered a valid model, to do this it checks through all the 10 containers of the CARMODEL array by implementing a loop(For1 to 10) and comparing each time the user value with the array value. If the person did not enter a valid model the program gives an error message and goes straight to asking for another model to check again.
If it is found at say position 3 then this position is recorded by assigning the loop position counter to some declared variable
0 · ·