You are on page 1of 1

Pascal Tasks

For each of the following tasks:

 Write a basic algorithm (plan your program)


Type the code into the Pascal editor
Compile the code
Run the code
 Test the code – check that the answers are correct

Sequence
1. Write a program to calculate gross pay (total pay before tax) based on the following:
• The standard number of hours is 40
• The program should read in the rate of pay
• The program should read in the number of hours worked
• The program should calculate:
The amount of pay for base hours
The number of hours worked overtime
The amount for overtime at 1.5 times the base rate
The total (gross) pay
• The program should display the gross pay

Selection
2. Adapt your conversion program to cover other options. Include the following:
• Welcome your user by name
• A menu of options
• Appropriate calculations
• Display the results

3. Write a quiz on your favourite TV show.


• Display the correct answer
• Calculate the number of correct answers
• Display the results

Repetition
4. Adapt your quiz to allow the user several chances to get the answer correct.
• Allocate points according to the number of chances the user has had.

You might also like