From a91a973b6ceb577400adef9c61d606e19023e042 Mon Sep 17 00:00:00 2001 From: Deinerovych Date: Thu, 26 Sep 2024 23:17:56 +0200 Subject: [PATCH] 2 --- cv1/program.c | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/cv1/program.c b/cv1/program.c index 65dcb02..68dc028 100644 --- a/cv1/program.c +++ b/cv1/program.c @@ -35,31 +35,3 @@ int contains_substring(char *food_name, char *ingredient) { } return 0; } - -int main() { - char ingredient[100]; - char food_name[100]; - char price[20]; - int count = 0; - - printf("Zadaj hladanu surovinu: "); - scanf("%s", ingredient); - - printf("Zadaj jedalny listok:\n"); - while (scanf("%s", food_name) != EOF) { - if (scanf("%s", price) == EOF) { - break; - } - - if (contains_substring(food_name, ingredient)) { - printf("%s\n%s\n", food_name, price); - } - - count++; - } - - printf("Nacitanych %d poloziek.\n", count); - - return 0; -} -