{ Assignment 2 }
{ Written by Bryan Bridges }

program assign02;
uses Crt;

{ Declare Constants }
const
  lastname1 = 'Ghebre';
  firstname1 = 'Haile';
  id1 = 123;
  rate1 = 1.50;
  lastname2 = 'Sharp';
  firstname2 = 'Mike';
  id2 = 124;
  rate2 = 2.00;
  lastname3 = 'Good';
  firstname3 = 'Tom';
  id3 = 125;
  rate3 = 4.00;
  lastname4 = 'Reed';
  firstname4 = 'Mary';
  id4 = 126;
  rate4 = 1.00;
  lastname5 = 'Omar';
  firstname5 = 'Kelly';
  id5 = 127;
  rate5 = 3.00;

{ Declare Variables }
var
   hours1 : real;
   hours2 : real;
   hours3 : real;
   hours4 : real;
   hours5 : real;
   wage1 : real;
   wage2 : real;
   wage3 : real;
   wage4 : real;
   wage5 : real;

{ Start Main Program }
begin

{ Prompt and Assign Input to Variables }
   clrscr;
   writeln;
   writeln ('********************** Wage Computor **********************');
   writeln ('Enter the hours worked for each of the following employees:');
   write (firstname1,' ',lastname1,' = ');
   readln (hours1);
   write (firstname2,' ',lastname2,' = ');
   readln (hours2);
   write (firstname3,' ',lastname3,' = ');
   readln (hours3);
   write (firstname4,' ',lastname4,' = ');
   readln (hours4);
   write (firstname5,' ',lastname5,' = ');
   readln (hours5);
   writeln;

{ Wage Computing }
  wage1 := hours1 * rate1;
  wage2 := hours2 * rate2;
  wage3 := hours3 * rate3;
  wage4 := hours4 * rate4;
  wage5 := hours5 * rate5;

{ Display Payroll Information Table Output }
  clrscr;
  writeln ('                      Pete''s Sweat Shop');
  writeln ('                      You Make It, And We Take It');
  writeln ('                      Payroll Information Table');
  writeln;
  writeln ('Last Name   First Name   Id   Hours Worked   Pay Rate/Hour   Gross Wage');
  writeln ('-----------------------------------------------------------------------');
  writeln (lastname1,'      ',firstname1,'        ',id1,'     ',hours1:3:2,'            ',rate1:3:2,'        ',wage1:3:2);
  writeln;
  writeln (lastname2,'       ',firstname2,'         ',id2,'     ',hours2:3:2,'            ',rate2:3:2,'       ',wage2:3:2);
  writeln;
  writeln (lastname3,'        ',firstname3,'          ',id3,'     ',hours3:3:2,'            ',rate3:3:2,'       ',wage3:3:2);
  writeln;
  writeln (lastname4,'        ',firstname4,'         ',id4,'     ',hours4:3:2,'            ',rate4:3:2,'        ',wage4:3:2);
  writeln;
  writeln (lastname5,'        ',firstname5,'        ',id5,'     ',hours5:3:2,'            ',rate5:3:2,'       ',wage5:3:2);
  writeln;

{ End Main Program }
end.


