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) {