test
This commit is contained in:
parent
8be67479fc
commit
f2f053aa41
@ -6,7 +6,6 @@
|
||||
#define MAX_LENGTH 100
|
||||
|
||||
void decode_hacker_script(const char *input, char *output) {
|
||||
|
||||
int j = 0;
|
||||
for (int i = 0; input[i]; i++) {
|
||||
char c = tolower(input[i]);
|
||||
@ -33,23 +32,21 @@ int main() {
|
||||
scanf("%s", search_item);
|
||||
decode_hacker_script(search_item, decoded_search);
|
||||
|
||||
while (getchar() != '\n');
|
||||
|
||||
printf("Zadaj jedalny listok:\n");
|
||||
|
||||
while (1) {
|
||||
|
||||
if (fgets(menu_item, sizeof(menu_item), stdin) == NULL || strlen(menu_item) == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
menu_item[strcspn(menu_item, "\n")] = 0;
|
||||
|
||||
|
||||
if (fgets(price, sizeof(price), stdin) == NULL || strlen(price) == 0) {
|
||||
break;
|
||||
|
||||
}
|
||||
price[strcspn(price, "\n")] = 0;
|
||||
|
||||
|
||||
decode_hacker_script(menu_item, decoded_item);
|
||||
|
||||
if (strstr(decoded_item, decoded_search) != NULL) {
|
||||
@ -58,9 +55,7 @@ int main() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
printf("Nacitanych %d poloziek.\n", count);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user