Flowchart
Flowchart is a pictorial way to express algorithm or process. So, instead of writing down our algorithm in some programming language like C, C++, Java, C#, PHP, Python, Ruby etc. we use flowchart to express our algorithm which gives us a general view about the algorithm.
Flowchart as the name indicates, is about the flow of execution of our algorithm.
Before we proceed, there are some important terms that we must understand in order to fully visualize the flowchart topic.
A procedure is a finite sequence of well-defined instructions, each of which can be carried out in a finite amount of time.
By finite, it means we can conut the number of instructions in the Procedure. And by well-defined we mean to say that there is no ambiguity in the instruction.
An algorithm is a step-by-step procedure (well-defined instructions) to solve a given problem.
For instance, the algorithm to find the sum of two numbers is
Or the algorithm to make a cup of Darjeeling tea is
A flowchart is a type of diagram that represents an algorithm or process.
How will you log in to your facebook account?
You may answer
etc...
All the options are absolutely correct. Lets move on to the next question.
Write an algorithm to log in to your facebook account?
Remember! An algorithm is a step-by-step procedure to solve a given problem.
You can write the algorithm to log into your facebook account in simple English as:
Yes, you guessed it right. Its really very simple and easy to write algorithm. All you have to do is write the correct steps in correct sequence.
There are 6 basic symbols commonly used in Flowchart.
1 | Terminal | Indicates the starting or ending of the algorithm. We draw a terminal symbol and write START inside it to indicate the start of the flowchart. Similarly, we draw a terminal symbol and write STOP inside it to indicate the end of the flowchart. | |
2 | Input/Output | Use for Input/Output (I/O) operation i.e. taking input and showing output. | |
3 | Process | Indicates any type of internal operations like initialization, calculation etc. | |
4 | Decision | Use for asking questions that can have either TRUE or FALSE (YES or NO) as an answer. Example: Are you online? Answer can be either YES or NO | |
5 | Connector | Connectors are used to connect breaks in the flowchart. If a flowchart takes more than one page, then to connect the flowchart between pages we use the connector. | |
6 | Control Flow | Show direction of flow. |
ADVERTISEMENT