usaa18cv3/main.c

21 lines
399 B
C
Raw Permalink Normal View History

2018-11-13 23:07:41 +00:00
#include "pizza3.h"
#include <stdio.h>
int main(int argc, char** argv){
2018-11-14 01:09:52 +00:00
struct pizza list[LIST_SIZE];
FILE * file;
2018-11-13 23:07:41 +00:00
2018-11-14 01:09:52 +00:00
file=fopen("zoznam.txt","r");
2018-11-13 23:07:41 +00:00
2018-11-14 01:09:52 +00:00
int size= read_pizza_list(file, list, LIST_SIZE);
print_pizza_list(list,size);
2018-11-13 23:07:41 +00:00
2018-11-14 01:09:52 +00:00
int res = search_pizza_list(list,size,"fazula");
printf("Fazulu obsahuje pizza %s za %f EUR",list[res].name,list[res].prize);
fclose(file);
2018-11-13 23:07:41 +00:00
return 0;}