hfwuhfbw
This commit is contained in:
parent
7585891ae1
commit
9f096f6d20
@ -109,13 +109,9 @@ int count_targets(struct station* station){
|
|||||||
}
|
}
|
||||||
|
|
||||||
int count_capacity(struct station* station){
|
int count_capacity(struct station* station){
|
||||||
int res = 0;
|
int total = 0;
|
||||||
struct car* ptr = *station->tracks;
|
for (struct car* ptr = *station->tracks; ptr; ptr = ptr->next)
|
||||||
while (ptr){
|
total += ptr->capacity;
|
||||||
res += ptr->capacity;
|
return total;
|
||||||
ptr = ptr->next;
|
|
||||||
|
|
||||||
}
|
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user