32 lines
499 B
C
32 lines
499 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
#define SIZE 128
|
|
|
|
int main()
|
|
{
|
|
char line[SIZE];
|
|
char answer[SIZE];
|
|
|
|
|
|
while (1)
|
|
{
|
|
char* p = fgets(line, SIZE, stdin);
|
|
if (p == NULL)
|
|
{
|
|
break;
|
|
}
|
|
else if (p == '*')
|
|
{
|
|
//precita a ulozi odpoved
|
|
sscanf(answer, "%s [^\n]", &answer);
|
|
}
|
|
else if (p == 'n')
|
|
{
|
|
printf("koniec\n");
|
|
exit(0);
|
|
}
|
|
}
|
|
|
|
return 0;
|
|
} |