Press the flag and answer "yes" or "no" depending on what number he says. It might take a while for him to guess your number if your number is big
My teacher helped me with this.