//*******************************************************
//
// Homework: 2
//
// Name: <Patrick Gardner Jr>
//
// Class: C Programming, <Fall 2025 Semester>
//
// Date: <09/23/2025-09/24/25>
//
// Assignment 2 Looping 3rd attempt
//
//********************************************************
#include <stdio.h>
int main()
{
int clockNumber; // employee clock number
float grossPay; // gross pay for week (wage * hours)
float hours; // number of hours worked per week
float wageRate; // hourly wage
int i; // loop index
int empNum; // number of employees to process
printf("*** Pay Calculator ***\n");
// Ask thee user how many employees to process
printf("Enter number of employees to process: ");
scanf("%d", &empNum);
// Print thee employeeee informtation
printf("\n\n\t----------------------------------------------------------\n");
printf("\tClock # Wage Hours Gross\n");
printf("\t----------------------------------------------------------\n");
// Loop each entered employee
for (i = 0; i < empNum; i++)
{
// Prompt yar input values
printf("\nEnter clock number for employee: ");
scanf("%d", &clockNumber);
printf("Enter hourly wage for employee: ");
scanf("%f", &wageRate);
printf("Enter the number of hours the employee worked: ");
scanf("%f", &hours);
// calculate gross pay
grossPay = wageRate * hours;
// print thee current employee info
printf("\t%06i %5.2f %5.1f %7.2f\n",
clockNumber, wageRate, hours, grossPay);
}
return 0; // success
}