This commit is contained in:
Bohdan Kapliuk 2024-09-30 21:54:42 +03:00
parent fc4437c6bd
commit 2170ac2a35

View File

@ -19,6 +19,16 @@ int main(){
printf("Zadaj hladanu surovinu:\n"); printf("Zadaj hladanu surovinu:\n");
fgets(surovina,LINESIZE,stdin); fgets(surovina,LINESIZE,stdin);
surovina[strcspn(surovina, "\n")] = '\0'; 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"); printf("Zadaj jedalny listok:\n");
int count = 0; int count = 0;
while (count < LINESIZE) { while (count < LINESIZE) {