diff --git a/cv6/main.c b/cv6/main.c index b8ba8d5..ad8a969 100644 --- a/cv6/main.c +++ b/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; }