This preview shows pages 1–2. Sign up to view the full content.
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
This note was uploaded on 01/22/2011 for the course ENG 006 taught by Professor Lagerstrom during the Spring '06 term at UC Davis.
- Spring '06