main
This commit is contained in:
parent
66fd105d99
commit
3bd0866264
20
cv6/main.c
20
cv6/main.c
@ -63,8 +63,24 @@ void test_station(struct station* station){
|
||||
int main(){
|
||||
|
||||
struct station* station = create_station();
|
||||
test_station(station);
|
||||
//test_station(station);
|
||||
printf("Zadajte stanicu na pridanie do zoznamu:\n");
|
||||
|
||||
char add[30];
|
||||
fgets(add, 30, stdin);
|
||||
add[strlen(add)-1] = '\0';
|
||||
printf("Zadajte capacitu stanice:\n");
|
||||
|
||||
char cap[10];
|
||||
fgets(cap,10,stdin);
|
||||
cap[strlen(cap)-1] = '\0';
|
||||
int n = atoi(cap);
|
||||
add_target_capacity(station,add,n);
|
||||
test_station(station);
|
||||
|
||||
printf("\n");
|
||||
print_station(station);
|
||||
printf("\n");
|
||||
printf("Zadajte hľadanu stanicu:\n");
|
||||
char find[30];
|
||||
fgets(find,30,stdin);
|
||||
@ -78,7 +94,9 @@ int main(){
|
||||
}
|
||||
else{
|
||||
printf("Capacita na danej statice: %d\n", s);
|
||||
|
||||
}
|
||||
|
||||
destroy_station(station);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user