Help With Looping

I need help with looping, I've been trying to figure this out for days and I cant seem to wrap my head around it. I know how to add, multiply and etc..., its the looping that confusing the hell out of me. this was one of my first assignments and now I have to try and loop it http://ideone.com/gkskmO. Please help


Write a C program that will calculate the pay for employees.
For each employee the program should prompt the user to enter the
clock number, wage rate, and number of hours. The clock number
is a unique identifier for an employee, the wage rate is the hourly
rate the employee is paid, and hours is how many hours an employee
worked within a given week.
The program determines the gross pay and outputs the following
format:

-----------------------------------
Clock# Wage Hours Gross
-----------------------------------
098401 10.60 51.0 540.60
Column alignment, leading zeros in Clock#, and zero suppression in
float fields are important. Remember that you cannot type in 098401
(its Octal, and invalid as well) ... type in as 98401 and use print
formatting to print as 098401. Assume that clock numbers are at a
most 6 digits long, and pad with leading zeros if less than 6 digits.
Use the following data as test input:

Clock# Wage Hours
98401 10.60 51.0
526488 9.75 42.5
765349 10.50 37.0
34645 12.25 45.0
127615 8.35 0.0

The program should query the user for how many sets of test data
(i.e., employees to process), and loop that many times. In our
example above, you would enter the number 5, as there would be 5
employees to process.

Where is your code so far?
http://ideone.com/GnwCOc

I cleaned it up a little, I just need help with getting the other employee's Info instead of just having one being displayed 5 times.
Topic archived. No new replies allowed.