Please help i'm a beginner in pascal - 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.

Please help i'm a beginner in pascal

sleepygunsadsleepygunsad Posts: 2Member
CAN ANYONE HELP ME START WRITING THIS PROGRAM IN PASCAL.... I DONT KNOW HOW TO START WITH THE ARRAY AND ADDING VALUES...... PLEASE HELP

PROBLEM SOLVING

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.


CARMODEL ARRAY

HC NISP NISSB MITSL CHEV SUB MAZ PEUG MER


CATEGORY ARRAY

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

Comments

Sign In or Register to comment.