Given a flowchart in Figure 5. Write the code

Question
Given a flowchart in Figure 5. Write the code segment for the shaded part of the flowchart using: i.the if statement ii.the switch statement

Question image 1Question image 2Question image 3Question image 4