Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
103 views

Algorithms and Flowcharts Are Two Different Ways of Presenting The Process of Solving A Problem

The document provides examples of flowcharts that visually represent algorithms to solve problems. It begins with an introduction to algorithms and flowcharts, explaining that algorithms are sets of steps to solve problems while flowcharts display those steps visually. It then provides four examples of algorithms with their corresponding flowcharts to determine bank interest, even/odd numbers, freezing temperature, and student exam results. The examples are intended to help understand how to represent algorithms using basic flowchart elements and their logical connections.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
103 views

Algorithms and Flowcharts Are Two Different Ways of Presenting The Process of Solving A Problem

The document provides examples of flowcharts that visually represent algorithms to solve problems. It begins with an introduction to algorithms and flowcharts, explaining that algorithms are sets of steps to solve problems while flowcharts display those steps visually. It then provides four examples of algorithms with their corresponding flowcharts to determine bank interest, even/odd numbers, freezing temperature, and student exam results. The examples are intended to help understand how to represent algorithms using basic flowchart elements and their logical connections.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Algorithms and flowcharts are two different ways of presenting

the process of solving a problem. Algorithms consist of a set of

steps for solving a particular problem, while in flowcharts, those

steps are usually displayed in shapes and process boxes with

arrows. So flowcharts can be used for presenting algorithms. This

page will introduce some examples of algorithm flowcharts.


Flowcharts are diagrams that visually present the process of solving problems.

They are drawn according to steps described in the algorithms. On this page you

will find some flowchart examples explaining the algorithms.

Rules of Drawing Flowcharts for Algorithms

There are some basic shapes and boxes included in flowcharts that are used in

the structure of explaining steps of algorithms. Knowing how to use them while

drawing flowcharts is crucial. Here are some rules that should be known:

1. All boxes of flowcharts are connected with arrows to show the logical

connection between them,

2. Flowcharts will flow from top to bottom,

3. All flowcharts start with a Start Box and end with a Terminal Box,
Examples of Flowcharts for Algorithms

These examples will help you get a better understanding of flowchart techniques.

Example 1: Calculate the Interest of a Bank Deposit

Algorithm:

 Step 1: Read amount,

 Step 2: Read years,

 Step 3: Read rate,

 Step 4: Calculate the interest with formula

"Interest=Amount*Years*Rate/100

 Step 5: Print interest,

Flowchart:
Example 2: Determine and Output Whether Number N is Even or Odd

Algorithm:

 Step 1: Read number N,

 Step 2: Set remainder as N modulo 2,

 Step 3: If remainder is equal to 0 then number N is even, else number N is

odd,
 Step 4: Print output.

Flowchart:

Example 3: Determine Whether a Temperature is Below or Above the

Freezing Point

Algorithm:
 Step 1: Input temperature,

 Step 2: If it is less than 32, then print "below freezing point", otherwise

print "above freezing point"

Flowchart:

Example 4: Determine Whether A Student Passed the Exam or Not:

Algorithm:

 Step 1: Input grades of 4 courses M1, M2, M3 and M4,


 Step 2: Calculate the average grade with formula

"Grade=(M1+M2+M3+M4)/4"

 Step 3: If the average grade is less than 60, print "FAIL", else print "PASS".

Flowchart:

You might also like