110 likes | 259 Views
REVIEW. Create a program that will determine if a number is positive or negative. Display the word positive or negative. REVIEW. Given the weight of three persons, prepare a flowchart that determines and prints the heaviest weight.
E N D
REVIEW • Create a program that will determine if a number is positive or negative. Display the word positive or negative.
REVIEW Given the weight of three persons, prepare a flowchart that determines and prints the heaviest weight.
An instructor uses the grading scheme below to award the letter grades in an examination. Given your numeric grade as an input, prepare a flowchart that will print the letter grade equivalent. 90-100 A 80-89 B 75-79 C 65-74 F >100 AND <65 “OUT OF RANGE”
-IS A STRUCTURE IN WHICH A PROCESS MAY BE REPEATED AS LONG AS A CERTAIN CONDITION REMAINS TRUE OR REMAINS FALSE. -CONTROL STRUCTURE USED FOR SPECIFYING THE REPEATED EXECUTION OF A SERIES OF STEPS.
DO UNTIL STRUCTURE DO WHILE STRUCTURE Loop Statement(s) Loop Statement(s) Do until test condition YES Do until test condition NO NO YES
DEFINITION IN THE DO-UNTIL STRUCTURE, EXIT FROM THE LOOP IS DONE AT THE END OF THE LOOP. ALSO, THE LOOP STATEMENTS ARE EXECUTED AT LAST ONCE BECAUSE THEY ARE PERFORMED BEFORE THE PROGRAM CHECKS WHETEHER TO STOP OR NOT. IN THE DO-WHILE STRUCTURE, THE LOOP-EXIT CONDITION IS PLACED AT THE BEGINNING OF THE LOOP.
Sample Problems: • Create a flowchart that will print the word “LSQC” for 10 times. • Prepare a flowchart that will generate nos. from 1 to 3. And will print all the nos. 3) Prepare a flowchart that will generate nos. from 3 to 1. And will print all the nos.
ACTIVITY • CREATE A FLOWCHART THAT WILL GENERATE NOS. FROM -3 TO 3 AND WILL PRINT ALL THE POSITIVE NOS. • CREATE A FLOWCHART THAT WILL GENERATE NOS. FROM 1 TO 3 AND WILL PRINT THE LAST NUMBER.