diff --git a/cv6/a_station.c b/cv6/a_station.c index 7b8b276..2d5fb25 100644 --- a/cv6/a_station.c +++ b/cv6/a_station.c @@ -61,6 +61,13 @@ int count_targets(struct station* station){ } int count_capacity(struct station* station){ - return 0; + int total_capacity = 0; + for (int i = 0; i < station->track_count; ++i) { + struct car* current = station->tracks[i]; + while (current) { + total_capacity += current->capacity; + current = current->next; + } + } + return total_capacity; } -