IT cxc 2012 Pascal program
Posted by Christie911
Last Updated: March 03, 2012
  3206

Program HousingCom (Input, output);

Uses CRT, DOS;

CONST
HEALTH = 155.00;    {Amount to be deducted for health}
CCAMOUNT = 10000.00;  {Minimum salary for Clarendon Courts}
SVGAMOUNT = 7500.00;  {Minimum salary for Sangre Grande Villa}
PGAMOUNT = 5500.00;   {Minimum salary for Providence Garden}

VAR
CC, SVG, PG: string;
appName :string;     {Stores Applicant's Name}
comCode :string;     {Stores community code}
gSalary : real;         {Stores gross salary}
totalExpenses : real;   {Stores total expense}
totalLoan: real;        {Stores total loan}
PAYE: real;             {Stores Pay As You Earn}
unionDues: real;        {Stores total expense}
pension: real;          {Stores pension}
salaryDeduction: real;  {Stores total salary deduction}
netSalary: real;        {Stores net salary}
totalRepayment: real;   {Stores total Repayment}
balance: real;          {Stores remaining amount after expenses paid}
qStatus: string;        {Qualification status}
aStatus: string;        {Approval status}

Begin
ClrScr;    {Clears the screen}
Write(   '              ********** Welcome To The HCC Program**********');
WRiteLn;
WriteLn;
Write('   Enter Name of Applicant  =>  ');
ReadLn(appName);
Write('   Enter Housing Community Code: CC, SVG, PG =>  ');
ReadLn(comCode);
Write('   Enter Gross Salary => ');
ReadLn(gSalary);
Write('   Enter Total Expenses => ');
ReadLn(totalExpenses);
Write('   Enter Total Loan Repayment =>  ');
ReadLn(totalLoan);

{Calculate relevant deductions}
IF (gSalary <= 5000.00) THEN
BEGIN
PAYE := 0.0;
END
ELSE
BEGIN
PAYE := ((gSalary - 5000.00) * 0.08);
END;

unionDues := (gSalary * 0.02);
pension := (gSalary * 0.15);
salaryDeduction := (PAYE + health + unionDues + pension);
netSalary := (gSalary - salaryDeduction);
totalRepayment := (totalExpenses + totalLoan);
balance := (netSalary - totalRepayment);

{Applicant's Qualification Status}
IF ((comCode = CC) AND (netSalary > CCAMOUNT)) THEN
BEGIN
qStatus := 'Qualified'
END;

IF ((comCode = SVG) AND (netSalary > SVGAMOUNT)) THEN
BEGIN
qStatus := 'Qualified'
END;

IF ((comCode = PG) AND (netSalary > PGAMOUNT)) THEN
BEGIN
qStatus := 'Qualified'
END;

{Applicant's Approval Status}
IF (balance >= (netSalary * 0.5)) THEN
BEGIN
aStatus := 'Approved';
Write('This Applicant is Qualified and Approved  ');
Readkey;
END
ELSE
BEGIN
Write('This Applicant is Not Approved  ');

Readkey;
END;

WriteLn;
WriteLn;
Write (   'Press Any Key to Exit ... ');
Readkey;
END.
   
  
 
 
   

 
 
Yes a it that lol
 
The information technology students are really great full for your Blog Tyrone! Thank you!
 
Tru!!!!!!!!