close all; clear; clc

number = input("Enter a number: ");
guess = guess_number("initial");
tries = 1;

while guess ~= number
    if guess > number
        guess = guess_number("high");
    else
        guess = guess_number("low");
    end
    tries = tries + 1;
end

fprintf("took %d guesses\n", tries);
