14-440-127 Recitation 8 Presentation

14-440-127 Recitation 8 Presentation - 14:440:127...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
14:440:127 Introduction to Computers for Engineers Recitation 8 Lecturer: Blase E. Ur Recitation Instructor: Tianming Li Recitation Instructor: Ke Xu Recitation Instructor: Brian Viezbicke Recitation Instructor: Mingliang Wang
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Rutgers University SOE 14:440:127 Recitation 8 Switch Case switch VARIABLE case OPTION1 STATEMENTS case OPTION2 STATEMENTS otherwise STATEMENTS end
Background image of page 2
Rutgers University SOE 14:440:127 Recitation 8 Switch Case month = input(‘Enter the number of the month’); switch month case [1 2 12] disp(‘winter') case [3 4 5] disp(‘spring') case [6 7 8] disp(‘summer') case [9 10 11] disp(‘fall') otherwise disp('incorrect month entered, use 1-12') end
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Rutgers University SOE 14:440:127 Recitation 8 Menus food = menu('What does your mom say when she gets this menu?', 'Cheeseburger','Steak','Potatoes','Italian Ice','Ok'); switch food case 1 disp('She ordered a cheeseburger') case 2 disp('She ordered steak') case 3 disp('She ordered potatoes') case 4 disp('She ordered italian ice') case 5 disp('Yo momma''s so fat, she went to the restaurant. ..') disp('. ..looked at the menu. .. and said OK'); end Note that “menu” returns the number of the choice selected
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/29/2012 for the course 440 127 taught by Professor Blase during the Fall '09 term at Rutgers.

Page1 / 15

14-440-127 Recitation 8 Presentation - 14:440:127...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online