main
This commit is contained in:
parent
66fd105d99
commit
3bd0866264
18
cv6/main.c
18
cv6/main.c
@ -63,8 +63,24 @@ void test_station(struct station* station){
|
|||||||
int main(){
|
int main(){
|
||||||
|
|
||||||
struct station* station = create_station();
|
struct station* station = create_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);
|
test_station(station);
|
||||||
|
|
||||||
|
printf("\n");
|
||||||
|
print_station(station);
|
||||||
|
printf("\n");
|
||||||
printf("Zadajte hľadanu stanicu:\n");
|
printf("Zadajte hľadanu stanicu:\n");
|
||||||
char find[30];
|
char find[30];
|
||||||
fgets(find,30,stdin);
|
fgets(find,30,stdin);
|
||||||
@ -78,7 +94,9 @@ int main(){
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
printf("Capacita na danej statice: %d\n", s);
|
printf("Capacita na danej statice: %d\n", s);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
destroy_station(station);
|
destroy_station(station);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user