rwjn
This commit is contained in:
parent
990262eea3
commit
d0f10aa71d
@ -97,12 +97,12 @@ int main(void){
|
||||
printf("Odpovedajte 'a' pre prvu moznost alebo 'n' pre druhu moznost.");
|
||||
while(tree){
|
||||
printf("\n%s", tree->value);
|
||||
fgets(answer, sizeof(answer), stdin);
|
||||
answer[strcspn(answer, "\n")] = '\0';
|
||||
if(answer[0] == '\0'){
|
||||
if( fgets(answer, sizeof(answer), stdin)){
|
||||
printf("\nKoniec vstupu\n");
|
||||
return 0;
|
||||
|
||||
}
|
||||
answer[strcspn(answer, "\n")] = '\0';
|
||||
|
||||
if(strcmp(answer, "n") == 0){
|
||||
tree = tree->right;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user