This is the syntax so far : How to change script so it displays correct if answer was included in the 5 guesses but also which guess gave the correct answer?
pickme1_100 = round(100.*rand(1));
Counter = 0;
while Guessedcorrectly ==0 A = input ('enter number between 1 and 100');
Counter = Counter + 1;
if A == pickme1_100 Guessedcorrectly = 1 && Counter == 5;
disp('Correct!');
elseif Guessedcorrectly ==0&& Counter >= 5
disp ('All are wrong, try again!')
end
while Guessedcorrectly ==0
A = input ('enter number between 1 and 100');
Counter = Counter + 1;
if A == pickme1_100
Guessedcorrectly = 1 && Counter == 5;
disp('Correct!');
elseif Guessedcorrectly ==0&& Counter >= 5
disp ('All are wrong, try again!')
end
end
end