diff --git a/cv2/program.c b/cv2/program.c new file mode 100644 index 0000000..4046a28 --- /dev/null +++ b/cv2/program.c @@ -0,0 +1,31 @@ +#include +#include +#include + +#define LINESIZE 100 + +struct Pizza { + char name[LINESIZE]; + float prize; +}; + +int main() { + char line[LINESIZE]; + memset(line, 0, LINESIZE); + char name[LINESIZE]; + struct Pizza jedalny_listok[LINESIZE]; + memset(jedalny_listok, 0, sizeof(struct Pizza) * LINESIZE); + size_t velkost; + while (fgets(line, LINESIZE, stdin)) { + velkost = strlen(line); + if (velkost == 1 && line[velkost - 1] == '\n') { + break; + } + strcpy(jedalny_listok[0].name, line); + printf("%s\n", jedalny_listok[0].name); + + + } + + return 0; +} \ No newline at end of file