Further triming and commenting

This commit is contained in:
Anton Dolozin 2025-09-23 22:26:17 +02:00
parent d89d13f7fd
commit 8ba2871aed

View File

@ -15,18 +15,18 @@ struct pizza *tretia = &jedalny_listok[2];
/// funkcia na prevratenie zakodovaneho znaku ane povodnyj
char hacker_script(char c) {
/// ked pismeno je vel'ke, tak vratim male
if (isupper(c)) {
return tolower(c);
}
/// zoznamy specialnych znakov
const char numbers[] = "0123456789";
const char letters[] = "oizeasbtbq";
// ked' znak patri do zonamu specialnych, vratime povodnu
for (int i = 0; i < 10; i++) {
if (c == numbers[i]) {
return letters[i];
@ -85,8 +85,6 @@ int search_string(const char* heap, const char* needle) {
int main() {
printf("Zadaj hladanu surovinu:\n");
char search[LINE_SIZE];
if (!fgets(search, sizeof(search), stdin)) {
return 1;}
search[strcspn(search, "\n")] = '\0';
printf("Zadaj jedalny listok:\n");