//******************************************************* 
// 
// Homework: 2
// 
// Name: Matt Smith
// 
// Class: C Programming, Spring 2025
// 
// Date: 2/5/2025
// 
// Description: Program which determines gross pay
// and outputs are sent to standard output (the screen).
// 
// 
//******************************************************** 

#include <stdio.h>

int main(void) {
	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
	//TODO - Add two variables, one for a loop index, and another for a loop test
	int idx;			//loop index variable
	int empNum;			//number of employees

	printf ("*** Pay Calculator ***\n");

	//TODO - Add your prompt to determine how many employees to process

	printf ("\nEnter number of employees to process: ");
	scanf ("%i", &empNum);

	//TODO - Add a loop of your choice here (for, do or while) to process each employee
	for ( idx = 0; idx <= empNum; ++idx ) {
		//Prompt for input values from the screen
		printf ("\nEnter clock number for employee: ");
		scanf ("%d", &clockNumber);
		printf ("\nEnter hourly wage for employee: ");
		scanf ("%f", &wageRate);
		printf ("\nEnter the number of hours the employee worked: ");
		scanf ("%f", &hours);

		//Calculate gross pay
		grossPay = wageRate * hours;

		//print out employee information
		printf ("\n\n\t-----------------------------------------------------------------\n");
		printf ("\tClock # Wage Hours Gross\n");
		printf ("\t-----------------------------------------------------------------\n");

		//print the data for the current employee
		printf ("\t%06i %5.2f %5.1f %7.2f\n", clockNumber, wageRate, hours, grossPay);

		//TODO - end your loop here
	
	}
	
	return 0;
}