This commit is contained in:
Maryna Kravtsova 2020-09-29 22:54:46 +02:00
parent 1c5e40c6cf
commit d3aee7f119

View File

@ -62,18 +62,20 @@ char hacker_script(char c){
}
int main(){
printf("Zadaj hladanu surovinu:");
char key[LINESIZE];
memset(key,0,LINESIZE);
char* r = fgets(key,LINESIZE,stdin);
printf("Zadaj jedalny listok:");
struct pizza jedalny_listok[100];
struct pizza pomocny[100];
memset(pomocny, 0, sizeof(struct pizza)*100);
memset(jedalny_listok, 0,sizeof(struct pizza)*100);
struct pizza item;
int counter = 0;
while(read_pizza(&item)){
strcpy(jedalny_listok[counter].name, item.name);
@ -91,7 +93,7 @@ int main(){
if(search_string(pomocny[i].name, key) != -1){
printf("%s", jedalny_listok[i].name);
printf("%.2f\n", jedalny_listok[i].prize);
printf("Nacitano %d poloziek\n", counter);
printf("Nacitano %d poloziek.\n", counter);
return 1;
}