Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
7
Task/Guess-the-number/MATLAB/guess-the-number.m
Normal file
7
Task/Guess-the-number/MATLAB/guess-the-number.m
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
number = ceil(10*rand(1));
|
||||
[guess, status] = str2num(input('Guess a number between 1 and 10: ','s'));
|
||||
|
||||
while (~status || guess ~= number)
|
||||
[guess, status] = str2num(input('Guess again: ','s'));
|
||||
end
|
||||
disp('Well guessed!')
|
||||
Loading…
Add table
Add a link
Reference in a new issue