View stunning SlideShares in full-screen with the new iOS app!Introducing SlideShare for AndroidExplore all your favorite topics in the SlideShare appGet the SlideShare app to Save for Later — even offline
View stunning SlideShares in full-screen with the new Android app!View stunning SlideShares in full-screen with the new iOS app!
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.
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.
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”
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”
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.