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.");
|
printf("Odpovedajte 'a' pre prvu moznost alebo 'n' pre druhu moznost.");
|
||||||
while(tree){
|
while(tree){
|
||||||
printf("\n%s", tree->value);
|
printf("\n%s", tree->value);
|
||||||
fgets(answer, sizeof(answer), stdin);
|
if( fgets(answer, sizeof(answer), stdin)){
|
||||||
answer[strcspn(answer, "\n")] = '\0';
|
|
||||||
if(answer[0] == '\0'){
|
|
||||||
printf("\nKoniec vstupu\n");
|
printf("\nKoniec vstupu\n");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
answer[strcspn(answer, "\n")] = '\0';
|
||||||
|
|
||||||
if(strcmp(answer, "n") == 0){
|
if(strcmp(answer, "n") == 0){
|
||||||
tree = tree->right;
|
tree = tree->right;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user