Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lab Instructor: Salem Othman

Similar presentations


Presentation on theme: "Lab Instructor: Salem Othman"— Presentation transcript:

1 Lab Instructor: Salem Othman
Branching Lab 2 Lab Instructor: Salem Othman

2 Review Go to Dr. Mikhail Nesterenko website and read the topic:
Boolean algebra, Boolean and relational operators, branching constructs You need to understand: if-statement if if-else if-else-if switch-statement

3 Question 1

4 Question 2 Block

5 Question 3

6 Mini sort ? one ? two ? three

7 Mini sort 3 one 2 two 1 three

8 Mini sort ? tmp 3 one 3 tmp 2 two 1 three 3 two 3 tmp 1 three 2 one 2

9 Number spell first digit second digit …………..99 if(number of tens is equal to 1) switch that recognizes the second digit and prints the whole number "ten", "eleven", or ... else switch that recognizes the first digit and prints "twenty" or "thirty", or ... note that this switch should ignore the case (print nothing) if the first digit is zero after that switch that recognizes the second digit and prints "one" or "two", or ... note that this switch should also ignore the case of zero


Download ppt "Lab Instructor: Salem Othman"

Similar presentations


Ads by Google