CAPE Computer Science Unit 1 · 2009 · Paper 2 · Question 6(c)
Employee records for Smith (ID 1000), Jones (ID 1001), and Singh (ID 1002) are maintained using struct payRec, tracking totalPay and numDays (initially 0).
Complete the main C program using the provided declarations to repeatedly read input data (id, hrs, rate) until sentinel ID 999 is entered, calculating daily salary and updating totalPay and numDays for each corresponding employee, then printing each employee's ID, total pay, and days worked as illustrated in the sample screen.
This question uses a figure or table from the paper — you'll see it when you practise.
The mark scheme is shown once you've answered.
Practise this question