From 2170ac2a359ba441de8f87786de98f81135f879c Mon Sep 17 00:00:00 2001 From: Bohdan Kapliuk Date: Mon, 30 Sep 2024 21:54:42 +0300 Subject: [PATCH] cv1 --- cv1/program.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cv1/program.c b/cv1/program.c index 8a1c1d5..cf16d63 100644 --- a/cv1/program.c +++ b/cv1/program.c @@ -19,6 +19,16 @@ int main(){ printf("Zadaj hladanu surovinu:\n"); fgets(surovina,LINESIZE,stdin); surovina[strcspn(surovina, "\n")] = '\0'; + for(int j = 0; j <= strcspn(surovina, "\0");j++){ + for(int x = 0; x < 11;x++){ + if(surovina[j] == numbers[x]){ + surovina[j] = letters[x]; + } + if(isupper(surovina[j])){ + surovina[j] = tolower(surovina[j]); + } + } + } printf("Zadaj jedalny listok:\n"); int count = 0; while (count < LINESIZE) {