Presentation is loading. Please wait.

Presentation is loading. Please wait.

ARITHMETIC OPERATORS COMPARISON/RELATIO NAL OPERATORS LOGIC OPERATORS ()Parenthesis>Greater than &&And ^Exponentiation<Less than||Or *Multiplication >=>=

Similar presentations


Presentation on theme: "ARITHMETIC OPERATORS COMPARISON/RELATIO NAL OPERATORS LOGIC OPERATORS ()Parenthesis>Greater than &&And ^Exponentiation<Less than||Or *Multiplication >=>="— Presentation transcript:

1

2 ARITHMETIC OPERATORS COMPARISON/RELATIO NAL OPERATORS LOGIC OPERATORS ()Parenthesis>Greater than &&And ^Exponentiation<Less than||Or *Multiplication >=>= Greater than or equal to !Not /Division <=<= Less than or equal to +Addition= Equal -Subtraction!=!= Not equal

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

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

5 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-89B 75-79 C 65-74 F >100 AND <65 “OUT OF RANGE”

6 ITERATION CONTROL STRUCTURE

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

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

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

10 Sample Problems: 1)Create a flowchart that will print the word “LSQC” for 10 times. 2)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.

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


Download ppt "ARITHMETIC OPERATORS COMPARISON/RELATIO NAL OPERATORS LOGIC OPERATORS ()Parenthesis>Greater than &&And ^Exponentiation<Less than||Or *Multiplication >=>="

Similar presentations


Ads by Google