Professional Documents
Culture Documents
Problem 6 IPO Chart Algorithm Flowchart Trace Table Pascal Program
Problem 6 IPO Chart Algorithm Flowchart Trace Table Pascal Program
Ali
4.2 IT
Problem #6
Write a program that could tell a user whether they are old enough to
learn how to drive a car. If the user's age meets the required driving
age which is 17 years old the program would print the Message You
are old enough to drive a car. Otherwise, it would print the Message
You are not old enough to drive a car.
I.P.O Chart
Pseudocode Algorithm
START
Read UserAge
If UserAge >= 17 then
Print ‘You are old enough to drive a car’
Else
Print ‘You are not old enough to drive a car’
End if
STOP
Rayad S. Ali
4.2 IT
Flowchart
START
Read UserAge
UserAge
>= 17
STOP
Rayad S. Ali
4.2 IT
Trace Table
Trace Table
Pascal Program
Program Age_to_learn_how_to_Drive; // This is the Program Header //
//This program reads a person’s age. If the person is 17 or over it will
print “You are old enough to drive a car ”. If the person is under 17
years of age, it will print “You are not old enough to drive a car”.//