Aktualizovat du5/program.c

This commit is contained in:
Tomáš Vlček 2026-04-13 21:29:45 +00:00
parent 734cc14935
commit ca7f34cbeb

View File

@ -12,20 +12,19 @@ int main()
while (1)
{
char* p = fgets(line, SIZE, stdin);
if (p == NULL)
if (line[0] == NULL)
{
break;
}
else if (p == '*')
else if (line[0] == '*')
{
//precita a ulozi odpoved
sscanf(answer, "%s [^\n]", &answer);
}
else if (p == 'n')
else if (line[0] == 'n')
{
break;
}
printf("%s", p);
}
printf("Expert_z_bufetu_to_vie.\n");