Code RoomVAT totals don't match invoice
HardPrep Room Coding #1972

VAT totals don't match invoice

Code reviewCode quality & reviewSenior–Staff~20 min

Review this Go that computes VAT per line at 19% and the order total, all in integer cents.

What a strong answer looks like

Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix, specific and kind.

0:00 of about 20 min
Mark a line and say what kind of problem it is.0 findings
1func orderVAT(lineCents []int64) int64 {
2 var total int64
3 for _, c := range lineCents {
4 total += int64(math.Round(float64(c) * 0.19))
5 }
6 return total
7}
8// invoice header shows int64(math.Round(float64(sum(lineCents)) * 0.19))
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.