This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: elseif guess>=num-3&guess<=num+3 %conditional is entered only if guess isn't within 1, therefore print fprintf('Nice try, but the number was %.0f.',num) else %conditional is entered only if guess isn't within 3, therefore print statment is executed fprintf('Stay away from the casinos. The number was %.0f.',num) end Sheet1 Page 2 %get user's guess %is executed if guess is within 1 %statement is executed if guess is within 3 %if no conditionals are met...
View Full Document
- Spring '06
- Randomness, Ryan Uy