cv7
This commit is contained in:
parent
a3c65d5786
commit
c46c5efb01
@ -92,15 +92,14 @@ void interact(struct tree *node)
|
|||||||
char answer[SIZE];
|
char answer[SIZE];
|
||||||
while (fgets(answer, SIZE, stdin))
|
while (fgets(answer, SIZE, stdin))
|
||||||
{
|
{
|
||||||
answer[strcspn(answer, "\n")] = 0;
|
if (answer[0] == '\n')
|
||||||
|
|
||||||
|
|
||||||
if (answer[0] == '\0')
|
|
||||||
{
|
{
|
||||||
printf("Koniec vstupu\n");
|
printf("Koniec vstupu\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
answer[strcspn(answer, "\n")] = 0;
|
||||||
|
|
||||||
if (strcmp(answer, "a") == 0)
|
if (strcmp(answer, "a") == 0)
|
||||||
{
|
{
|
||||||
interact(node->left);
|
interact(node->left);
|
||||||
|
Loading…
Reference in New Issue
Block a user