Thursday, June 7, 2018

Color Checker in Turbo Pascal

In this article I would like to share with you a sample program that will use case conditional statement in Turbo Pascal. What the program does is to ask the user to give a letter and then our program will check and determine what is the corresponding color will be display on the screen based on the letter being given by our user. I am using Turbo Pascal for Windows in writing this simple program of ours.

I am currently accepting programming work, it project, school 

programming projects , thesis and capstone projects, IT consulting 

work and web development work kindly contact me in the following email address for further details.  If you want to advertise in my website kindly contact me also in my email address also. Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.







Sample Program Output


Program Listing

color.pas

(* color.pas                                                        *)
(* Author : Mr. Jake R. Pomperada, MAED-IT                          *)
(* June 7, 2018 Thursday                                            *)
(* Eroreco Subdivision, Bacolod City, Negros Occidental Philippines *)

program ColorChecker;

uses
  WinCrt;


Var Select_Color : Char;

Begin
  Write('Color Checker in Turbo Pascal');
  Writeln;
  Write('Written By Mr. Jake R. Pomperada, MAED-IT');
  Writeln;
  Writeln;
  Write('Give a Letter : ');
  Readln(Select_Color);
  Writeln;
  Writeln;
  Case Select_Color of
     'B','b' : writeln('You have selected BLUE Color');
     'R','r' : writeln('You have selected RED Color');
     'G','g' : writeln('You have selected GREEN Color');
     'V','v' : writeln('You have selected VIOLET Color');
 Else
    Writeln('Sorry unknown color selected.');
 end;
 Writeln;
 Write('End of Program');
 Writeln;
End.

No comments:

Post a Comment