#include #include #include #include #include #include #define velkost strlen #define size 100 void hacker_script(char *string, int len); struct pizza { char name[size]; float price; }; int main() { struct pizza listok[size]; char input[100]= {0}; char keyword[size] = {0}; char kopia[size] = {0}; int pomocna[size] = {0}; float cena = 0; int counter = 0; int helper = 2; int yes = 0; int y = 0; char * pch; printf("Zadaj hladanu surovinu:\n"); fgets(keyword, sizeof(keyword), stdin); keyword[velkost(keyword)-1] = '\0'; hacker_script(keyword, strlen(keyword)); printf("Zadaj jedalny listok:\n"); while(fgets(input, sizeof(input), stdin) && strcmp( input, "\n" ) != 0 ){ if(helper %2 == 0){ strcpy(listok[counter].name, input); yes++; } else{ cena = strtof(input, NULL); listok[counter].price = cena; yes++; } if(yes == 2){ counter++; yes = 0; } helper++; } for(int x=0; x