Code Room
Code reviewHardcr-g342
Subject Money roundingLevel Senior–Staff~20 minCommon in Code quality & review interviewsIndustries Software development

Question

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.

Talk through your review
Code to reviewgo
func orderVAT(lineCents []int64) int64 {    var total int64    for _, c := range lineCents {        total += int64(math.Round(float64(c) * 0.19))    }    return total}// invoice header shows int64(math.Round(float64(sum(lineCents)) * 0.19))
Run or narrate your approach, then ask the coach.