Обновить cv6/main.c
This commit is contained in:
		
							parent
							
								
									8ff72ee527
								
							
						
					
					
						commit
						fb848bf8d2
					
				
							
								
								
									
										21
									
								
								cv6/main.c
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								cv6/main.c
									
									
									
									
									
								
							| @ -0,0 +1,21 @@ | ||||
| #include <stdio.h> | ||||
| #include "a_station.h" | ||||
| 
 | ||||
| int main() { | ||||
|     struct station* my_station = create_station(); | ||||
|     if (my_station == NULL) { | ||||
|         printf("Chyba: Nepodarilo sa vytvoriť stanicu\n"); | ||||
|         return 1; | ||||
|     } | ||||
| 
 | ||||
|     add_target_capacity(my_station, "Bratislava", 100); | ||||
|     add_target_capacity(my_station, "Kosice", 150); | ||||
|     add_target_capacity(my_station, "Bratislava", 50); | ||||
| 
 | ||||
|     printf("Kapacita do stanice Bratislava: %d\n", get_target_capacity(my_station, "Bratislava")); | ||||
|     printf("Celkový počet cieľových staníc: %d\n", count_targets(my_station)); | ||||
|     printf("Celková kapacita na všetkých smeroch: %d\n", count_capacity(my_station)); | ||||
| 
 | ||||
|     destroy_station(my_station); | ||||
|     return 0; | ||||
| } | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user