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