oooodchod

This commit is contained in:
Tančáková 2024-03-20 17:58:22 +01:00
parent 2bd09509ce
commit 198acd7247

View File

@ -48,6 +48,13 @@ int main() {
printf("%d %s\n", database[i].votes, database[i].name); printf("%d %s\n", database[i].votes, database[i].name);
} }
// Výpočet a výpis celkového počtu hlasov
int total_votes = 0;
for (int i = 0; i < size; i++) {
total_votes += database[i].votes;
}
printf("Celkovy pocet ziskanych hlasov: %d\n", total_votes);
return 0; return 0;
} }