Here is a simple program payroll program that I wrote in COBOL that will ask the user to give the employees name, daily rate and number of days work and then our program will compute the employees salary.
Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.
My mobile number here in the Philippines is 09173084360.
Sample Program Output
Program Listing
******************************************************************
* Author: MR. JAKE R. POMPERADA
* Date: AUGUST 27, 2016 SATURDAY
* Purpose: PAYROLL PROGRAM
******************************************************************
IDENTIFICATION DIVISION.
PROGRAM-ID. PAYROLL_PROGRAM.
DATA DIVISION.
WORKING-STORAGE SECTION.
77 name_emp PIC X(20).
77 daily_rate PIC 9(4).
77 days_work PIC 9(4).
77 solve_salary PIC 9(4).
PROCEDURE DIVISION.
PARA.
DISPLAY "PAYROLL PROGRAM IN COBOL".
DISPLAY "".
DISPLAY "Name of the employee :".
ACCEPT name_emp.
DISPLAY "Give Daily Rate : ".
ACCEPT daily_rate.
DISPLAY "Number of Days Worked : ".
ACCEPT days_work.
COMPUTE solve_salary = (daily_rate * days_work).
DISPLAY "".
DISPLAY " Name : " name_emp.
DISPLAY "Gross Salary : Php " solve_salary.
STOP RUN.
In the procedure division, statements need to begin in or after column 12 and paragraph names need to start between columns 8-11. So, your computer probably will print error messages when it tries to compile your program. Did your server delete spaces or tabs?
ReplyDelete