6. SELECTION Selection is used in a computer program or algorithm to determine which particular step or set of steps is to be executed
7. Example Compute the sum of x and y if x is greater than y, other wise print d as their difference. Draw a flowchart to find the largest of three numbers A, B, and C.
9. Repetition Repetition allows for a portion of an algorithm or computer program to be done any number of times dependent on some condition being met. An occurrence of repetition is usually known as a loop. Thebody of the loop is executed repeatedly while the termination condition is true.
10. Repetition (Pre-Test Structure) A pre-tested loop is so named because the condition has to be met atthe very beginning of the loop. This construct is often called a guarded loop.
15. Selection (Structure) Determine if the input age is qualified to vote or not. If qualified, display “Qualified to vote!” if not, display “Too young!” Given a number, print the message “Positive”, “Negative” or “Neither”
16. 3. The V. Mapa High School is accepting freshmen who are not more than 15 years old. Given the students’ name and age, print “ACCEPTED” if it meets the ages Requirement otherwise print “Sorry”
17. 4. Due to your poor results in the examination, I decided to increase each one of you by 5 points. Input your grade and print the new grade. If the original grade exceeds 90, then it remains as is.