Showing posts with label payroll program in turbo pascal. Show all posts
Showing posts with label payroll program in turbo pascal. Show all posts

Saturday, April 22, 2017

Payroll Program in Turbo Pascal

Here is a sample program that I wrote using Turbo Pascal 6 to ask the user how many days work and the rate per day and our program will compute for the salary of the employee. The code is very simple and easy to understand.  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


Program Payroll;

Uses Crt;

Var Daily_Rate, No_days_work, salary : Integer;

Begin

  Clrscr;
  Writeln;
  textcolor(white);
  Write('Payroll Program in Turbo Pascal');
  Writeln;
  Writeln;
  Write('How many days worked : ');
  Readln(No_days_work);
  Writeln;
  Write('What is the daily rate : ');
  Readln(Daily_Rate);

  Salary := (No_days_work * Daily_Rate);

  Writeln;
  Write('Your salary is  Php ',salary,'.');
  writeln;
  writeln;
  Write('End of Program');
  Readln;
 End.



Sunday, July 24, 2016

Payroll Program in Turbo Pascal

In this article I would like to share with you a sample program that I wrote using Pascal as my language of choice. I called this program Payroll Program in Turbo Pascal. What does the program will do is to ask the user the name of the employee and then it will ask the number of days work. After which the program will compute the salary of the employee. I am using Turbo Pascal 6 For DOS as my compiler in writing this 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 Payroll;
Uses Crt;

Const rate = 5.50;

Var  employee : string;
     days     : integer;
     total    : real;

Begin

Clrscr;
Writeln('Payroll Program in Pascal');
Writeln;
Write('Give Employees Name :');
Readln(employee);
Write('Give Number of Days Worked : ');
Readln(days);

Total := (days * rate);

    Writeln;
Write('Display Payroll Result');
Writeln;
        Writeln;
        Write('Employees Name : ' ,employee);
        Writeln;
Write('For ',days:2, ' days of work, you have earned $');
Write(total:5:2);
Writeln;
    Writeln;
Write('End of Program');
Readln;
End.