31 lines
643 B
C
31 lines
643 B
C
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
#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;
|
|
} |