riddle2prompt='I dont have eyes, but once I did see. Once I had thoughts, but now Im white and empty. What am I? ';
%Asking the final riddle because the user answered the other two right.
fprintf('*sighs* You arent supposed to get these. Your final riddle is;')
%The game ends if answer is wrong.
fprintf('What did I say about not messing up. Get it right, %s!',name)
fprintf('You have 2 more tries.')
fprintf('Haha, you only have 1 more tries. Careful.')
fprintf('Your hint for this riddle is; your brain makes its home here.')
fprintf('Oh no, what did I say. Now youve already failed my game.')
fprintf('Its GAME OVER for you!!')
end %End to an if statement
How do I end the for loop if the user answers the riddle correctly, I dont want to use break for this.
Is there another way to do it??