Electrical and Computer Engineering
10
UAH
CPE 112
Payroll Program (continued)
•
•
•int main
•{
•  float payRate; // Employee’s pay rat
•  float hours; // Hours worked
•  float wages; // Wages earned
•  float total; // Total company payroll
•  int empNum; // Employee ID number
•  ofstream payFile; // Company payroll file
•
•
•  payFile.open(“payfile.dat”); // Open the output file
•  total = 0.0; // Initialize total
•
•
•