Presentation is loading. Please wait.

Presentation is loading. Please wait.

A step-by-step procedure for solving a problem in a finite number of steps.

Similar presentations


Presentation on theme: "A step-by-step procedure for solving a problem in a finite number of steps."— Presentation transcript:

1

2 A step-by-step procedure for solving a problem in a finite number of steps.

3 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

4 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

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

6

7

8

9 Statemement a Statemement b Statemement c Sequence is a default control structure. Instructions are executed one after another

10 Selection structure test the condition and then executes one sequence of statements instead of another, depending on whether the condition is true or false

11 Condition p? Statemement a Statemement b TF

12 Condition p? Statemement a T F

13 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

14 Condition p? Statemement block T F

15 MAX  VALUE1 Print “The largest value is”, MAX STOP YN START Input VALUE1,VALUE2 MAX  VALUE2 is VALUE1>VALUE2

16

17

18


Download ppt "A step-by-step procedure for solving a problem in a finite number of steps."

Similar presentations


Ads by Google