Initializacia

This commit is contained in:
Kozar 2024-10-02 18:31:47 +00:00
parent df6e7666dc
commit ec266a099f

View File

@ -28,9 +28,10 @@ int main() {
fgets(ingredient, MAX_INPUT_LENGTH, stdin); fgets(ingredient, MAX_INPUT_LENGTH, stdin);
ingredient[strcspn(ingredient, "\n")] = 0; // Remove newline character ingredient[strcspn(ingredient, "\n")] = 0; // Remove newline character
printf("Zadaj jedalny listok:\n"); // Print the prompt
// Read the menu items // Read the menu items
while (1) { while (1) {
printf("Zadaj jedalny listok: ");
fgets(menu_item, MAX_INPUT_LENGTH, stdin); fgets(menu_item, MAX_INPUT_LENGTH, stdin);
if (feof(stdin) || strlen(menu_item) == 1) { if (feof(stdin) || strlen(menu_item) == 1) {
break; break;