Please enable JavaScript.
Coggle requires JavaScript to display documents.
Algorithms and Flowcharts - Coggle Diagram
Algorithms and Flowcharts
Introduction
A program is a set of instructions given to the computer to execute a program that consists of following a pattern:
Analyze the problem.
Write an Algorithm.
Draw a flowchart.
Convert the flowchart into a program.
Algorithms
It is a combination of statements and events that can be arranged as steps to arranged as steps to solve a specific problem (before converting it into a flowchart)
.
As example:
Input the number of books in the library (NO).
Input the number of borrowed books (NB).
Find the remaining books number (NR), NR = NO-NB
Print NR
Flowcharts
Flowcharts are graphs that represent the formal view used to solve any problem. Flowcharts help the programmer to write his program. Flowcharts consist of a shapes connected by a straight lines
Link Title
This link is for view a picture about the Flowcharts
We can summarize the use of algorithms and flowchartsas follow:
To show the mathematical logic used to solve problems
To show how the data processing is done.
Helps the programmer to write his program.
Divides the big problem to smaller parts.
To avoid the errors that occurred during writing the program
It is a middle step between problem difficulty and its conversion to suitable program.
Easy to convert it to any programming language.
In general, we can divide flowcharts to a four
shapes (charts)
Simple sequence charts
The events arrangement of this type is as straight sequence from the beginning of the program to the end (Event-1 to Event-n in figure below). This type of charts does not have any branches or loops.
Link Title
Branched charts.
The need for the branching is to make decisions between two or more choices.
Link Title
Single loop chairts.
These chartsare used when we need to repwat an operation or group of operations to specific (or non specific) number of times.These types of charts are used to createthe counters.
Counters can be divided to two forms.
General form.
Conventional form.
Link Title
Multi-loops charts.
Its so called because it contains many loops. These loops arenested together without interesection. As shown the loop no. I is called"inner loop" and loop no.2 the outer loop. The priority ofexecution will be to the internal loops then sequential to the internal loops.
Link Title