This commit is contained in:
Bohdan Kapliuk 2024-09-29 15:56:31 +03:00
parent eaf77e21b0
commit 8ff79ad2c9

View File

@ -11,6 +11,7 @@ int main(){
char surovina[LINESIZE]; char surovina[LINESIZE];
char vstup[LINESIZE]; char vstup[LINESIZE];
struct pizza menu[LINESIZE]; struct pizza menu[LINESIZE];
struct pizza menu1[LINESIZE];
char numbers[] = "0123456789"; char numbers[] = "0123456789";
char letters[] = "oizeasbtbq"; char letters[] = "oizeasbtbq";
printf("Zadaj hladanu surovinu:\n"); printf("Zadaj hladanu surovinu:\n");
@ -24,6 +25,7 @@ int main(){
break; break;
} }
strcpy(menu[count].name, vstup); strcpy(menu[count].name, vstup);
strcpy(menu1[count].name, vstup);
} else { } else {
break; break;
} }
@ -34,6 +36,7 @@ int main(){
break; break;
} }
strcpy(menu[count].price, vstup); strcpy(menu[count].price, vstup);
strcpy(menu1[count].price, vstup);
} else { } else {
break; break;
} }
@ -63,8 +66,8 @@ int main(){
printf("chyba"); printf("chyba");
} }
else{ else{
printf("%s\n", menu[odpoved].name); printf("%s\n", menu1[odpoved].name);
printf("%s\n", menu[odpoved].price); printf("%s\n", menu1[odpoved].price);
} }
printf("Nacitanych %d poloziek.\n", count); printf("Nacitanych %d poloziek.\n", count);
return 0; return 0;