From 5f05c1abfe3e9d9d5e1210d1b483c5b6c1057bf2 Mon Sep 17 00:00:00 2001 From: SOLAR D Date: Wed, 21 Oct 2026 10:38:30 +0200 Subject: [PATCH] F3 --- banque.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/banque.c b/banque.c index 02b0e39..e02fda0 100644 --- a/banque.c +++ b/banque.c @@ -108,10 +108,9 @@ void total_par_client(const Transaction *t, int n, long *totaux) { for (int c = 0; c < NB_CLIENTS; c++) { totaux[c] = 0; - for (int i = 0; i < n; i++) - if (t[i].client == c) - totaux[c] += t[i].montant; } + for (int i = 0; i < n; i++) + totaux[t[i].client] += t[i].montant; } /* F4 : solde total de chaque jour */