cv1
This commit is contained in:
parent
ec8dcedf2a
commit
eaf77e21b0
@ -39,7 +39,7 @@ int main(){
|
|||||||
}
|
}
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
for(int i = 0; i <= count;i++){
|
for(int i = 0; i < count;i++){
|
||||||
for(int j = 0; j <= strlen(menu[i].name);j++){
|
for(int j = 0; j <= strlen(menu[i].name);j++){
|
||||||
for(int x = 0; x <= 11;x++){
|
for(int x = 0; x <= 11;x++){
|
||||||
if(menu[i].name[j] == numbers[x]){
|
if(menu[i].name[j] == numbers[x]){
|
||||||
@ -48,8 +48,8 @@ int main(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int odpoved;
|
int odpoved = -1;
|
||||||
for(int i = 0; i <= count;i++){
|
for(int i = 0; i <= count && odpoved == -1;i++){
|
||||||
for(int j = 0; j <= strlen(menu[i].name);j++){
|
for(int j = 0; j <= strlen(menu[i].name);j++){
|
||||||
for(int x = 0; x <= strlen(surovina);x++){
|
for(int x = 0; x <= strlen(surovina);x++){
|
||||||
if(surovina[x] != menu[i].name[j]){
|
if(surovina[x] != menu[i].name[j]){
|
||||||
@ -59,8 +59,13 @@ int main(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf("%s\n", menu[odpoved].name);
|
if(odpoved == -1){
|
||||||
printf("%s\n", menu[odpoved].price);
|
printf("chyba");
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
printf("%s\n", menu[odpoved].name);
|
||||||
|
printf("%s\n", menu[odpoved].price);
|
||||||
|
}
|
||||||
printf("Nacitanych %d poloziek.\n", count);
|
printf("Nacitanych %d poloziek.\n", count);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user