Showing posts with label age checker in pascal. Show all posts
Showing posts with label age checker in pascal. Show all posts

Saturday, August 6, 2016

Age Checker in Pascal

In this article I would like to share with you a sample program that I wrote in Pascal to check if the given age of the user is already considered as an Adult or still a minor. I am using Turbo Pascal 5.0 as my compiler in this sample program.

Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.





Sample Program Output


Program Listing

Program Age;
Uses Crt;

Var Age_User  : Integer;

Begin
  Clrscr;
  Write('Age Checker in Pascal');
  writeln;
  writeln;
  Write('What is your age? ');
  readln(Age_User);

  if (Age_User >=18) then
    Begin
    Writeln;
    Writeln(Age_User, ' years old. You are already an Adult.');
    End
  else
     Begin
     Writeln;
     Writeln(Age_User, ' years old. You are still a Minor.');
     End;
  Readln;
End.