1 / 11

REVIEW

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.

iago
Télécharger la présentation

REVIEW

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. REVIEW • Create a program that will determine if a number is positive or negative. Display the word positive or negative.

  2. REVIEW Given the weight of three persons, prepare a flowchart that determines and prints the heaviest weight.

  3. 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”

  4. ITERATION CONTROL STRUCTURE

  5. -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.

  6. DO UNTIL STRUCTURE DO WHILE STRUCTURE Loop Statement(s) Loop Statement(s) Do until test condition YES Do until test condition NO NO YES

  7. 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.

  8. 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.

  9. 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.

More Related