A step-by-step procedure for solving a problem in a finite number of steps.
Problem Statement: Find the sum of natural numbers from 0 to 50 START IF N <= 50 THEN GOTO Step 4 PRINT sum STOP Step 1: Step 2: Step 3: Step 4: Step 5: Step 6: Step 7: Step 8: sum0 N 1 sum + N NN + 1
Problem Statement: Find the sum of any TWO numbers Problem Statement: Check whether a number given by user is EVEN or ODD Problem Statement: Find the largest of THREE numbers
Flowchart is a type of diagram that represents an algorithm or process, showing the steps as boxes of various kinds, and their order by connecting them with arrows.
Statemement a Statemement b Statemement c Sequence is a default control structure. Instructions are executed one after another
Selection structure test the condition and then executes one sequence of statements instead of another, depending on whether the condition is true or false
Condition p? Statemement a Statemement b TF
Condition p? Statemement a T F
Repetition structure specifies the repetition of an action while some condition remains true. When the conditions of the control statement have been met and control passes to the next statement beyond the repetition structure
Condition p? Statemement block T F
MAX VALUE1 Print “The largest value is”, MAX STOP YN START Input VALUE1,VALUE2 MAX VALUE2 is VALUE1>VALUE2