Here is a simple program that will check if the given age of the user is already legal or not let us assume the legal is 18 years old it uses if else statement in Pascal to check. The code is very easy to understand and use. Thank you.
My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.
Sample Program Output
Program Listing
{Written By: Mr. Jake R. Pomperada, MAED-IT }
{Date : March 23, 2017 Thursday }
{Metro Manila, Philippines }
{jakerpomperada@yahoo.com and jakerpomperada@gmail.com }
Program legal_age_checker;
Uses WinCrt;
Var Age : Integer;
Begin
clrscr;
Age := 0;
writeln('LEGAL AGE CHECKER IN PASCAL');
writeln;
Write('Enter Your Age : ');
Readln(Age);
If (Age>=18) then
Begin
Writeln;
Write('You are already an Adult at the age of ',age,'.');
End
Else
Begin
Writeln;
Write('You are still a Minor at the age of ',age,'.');
End;
writeln;
writeln;
Writeln;
writeln(' END OF PROGRAM ');
readln;
End.