From 497be19a0ed4a16d926435ae676737b96d8cb7a6 Mon Sep 17 00:00:00 2001 From: mr314ot Date: Tue, 7 Oct 2025 10:40:44 +0200 Subject: [PATCH] du2 - 1 --- du2/program.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 du2/program.c diff --git a/du2/program.c b/du2/program.c new file mode 100644 index 0000000..2b59e54 --- /dev/null +++ b/du2/program.c @@ -0,0 +1,29 @@ +#include +#include +#include + +#define LINESIZE 100 +#define MAXITEMS 100 + +// struktura pre polozku jed. listka +struct pizza { + char name[LINESIZE]; + float price; +}; + +int read_pizza(struct pizza *item) { + char line1[LINESIZE]; + char line2[LINESIZE]; + + if (!fgets(line1, LINESIZE, stdin)) return 0; + line1[strcspn(line1, "\n")] = 0; + + float value; + if (sscanf(line2, "%f", &value) != 1 +} + + +int main() { + + return 0; +}