achhhhh
This commit is contained in:
parent
66e7bf7fad
commit
d17289c942
@ -91,23 +91,21 @@ int count_targets(struct station* station){
|
|||||||
counter+=1;
|
counter+=1;
|
||||||
newCar=newCar->next;
|
newCar=newCar->next;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
return counter;
|
||||||
|
}
|
||||||
|
|
||||||
|
int count_capacity(struct station* station){
|
||||||
|
int counter=0;
|
||||||
|
for(int i=0;i<station->track_count;i++){
|
||||||
|
struct car* newCar= station->tracks[i];
|
||||||
|
while (newCar->value!=NULL)
|
||||||
|
{
|
||||||
|
counter;+=1;
|
||||||
|
newCar=newCar->next;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return counter;
|
return counter;
|
||||||
}
|
}
|
||||||
|
|
||||||
int count_capacity(struct station* station){
|
|
||||||
int count=0;
|
|
||||||
for(int i=0;i<station->track_count;i++){
|
|
||||||
struct car* newCar= station->tracks[i];
|
|
||||||
while (newCar->value!=NULL)
|
|
||||||
{
|
|
||||||
count+=1;
|
|
||||||
newCar=newCar->next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user