From c7fca6e06ebf6225dbe5d228905564c248adcdae Mon Sep 17 00:00:00 2001 From: Anton Dolozin Date: Wed, 5 Nov 2025 00:19:58 +0100 Subject: [PATCH] Count cap --- du5/a_station.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/du5/a_station.c b/du5/a_station.c index 379e73f..0918755 100644 --- a/du5/a_station.c +++ b/du5/a_station.c @@ -95,6 +95,12 @@ int count_targets(struct station* station){ } int count_capacity(struct station* station){ - return 0; + int res = 0; + struct car* ptr = *station->tracks; + while (ptr){ + res += ptr->capacity; + + } + return res; }