4. commit
This commit is contained in:
		
							parent
							
								
									decdc9f4c3
								
							
						
					
					
						commit
						2e3c820cc9
					
				@ -55,11 +55,15 @@ void ask(struct node* tree){
 | 
			
		||||
    printf("%s", tree->data);
 | 
			
		||||
    if(tree->data[0] == '*'){
 | 
			
		||||
        puts("Koniec");
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
    if(tree->left != NULL){
 | 
			
		||||
    char buff[SIZE];
 | 
			
		||||
    char* r = fgets(buff, SIZE, stdin);
 | 
			
		||||
    r = fgets(buff, SIZE, stdin);
 | 
			
		||||
    if(r[0] == 'a' && tree->left != NULL){
 | 
			
		||||
        tree = tree->left;
 | 
			
		||||
        ask(tree);
 | 
			
		||||
    }else if(tree->right != NULL) {
 | 
			
		||||
    }else if(r[0] == 'n' && tree->right != NULL) {
 | 
			
		||||
        tree = tree->right;
 | 
			
		||||
        ask(tree);
 | 
			
		||||
    }else{
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user