I would not recommend manual updation of C by users. For two reasons - it would increase their effort as well as introduce scope for error.
Your suggestion of incorporating the logic for calculating C using the Z function may be feasible(am not certain of it as I don't know whether data for all employees can be read in a Z function, or only data for that specific employee), but this means C will need to be calculated once for each employee, which will slow down processing. I'd still opt for a Z program so that payroll processing time is not increased.