In my recent article Introduction to my blog, I discussed that this blog is dedicated to those who want to learn programming and that too vey fast and in effective way.
Before proceeding to the programming and programming languages one must know thee things viz. Algorithm, Flowchart and programming.
Programming is the most advanced version of the other two.
Here is a bit discussion of these three :
Algorithm starts with the problem. Algorithm is the analytical way of solving a problem.
in case of Algorithm a standard set of commands are given and we have to calculate or solve the problem for answer.
Algorithm is done step by step and in any case First step is named as start and last as stop.
To understand it in a better way let us consider some examples :
General Life Example
Problem : Prepare some food of your own choice.
Step 1: Start
Step 2: Decide the food item to be prepared.
Step 3: Buy the necessary items including vegetables etc. if needed.
Step 4: Get the recipe, if not known to you.
Step 5: Prepare the food as per recipe.
Step 6: Serve the food.
Step 7: Stop.
Problem : Add two numbers in computer.
This is a technical problem and one thing you must understand that whenever you declare a number it must be initialized i.e it must be declared to have some space in memory and must have an initial value to avoid unnecessary errors.
Step 1: Start
Step 2: Name the number one as 'a' and second number as 'b'.
Step 3: Enter the value of 'a' in memory space available for 'a' and similar store 'b' in memory space available for 'b'.
Step 4: Initialize a variable 'c' that have starting value 0.
Step 5: Add the numbers and store the result in 'c'.
Step 6: Display the value in 'c'.
Step 7: Stop
Flowchart is the graphical representation of algorithm. In flowchart various symbols are used to represent various actions.
Here are some examples:
|This structure is called terminator in flowcharts. It is used for both start and stop. Here is start structure in flowcharts.|
|The given structure, rectangle, is used to indicate processing or computing in a flowchart.|
|This structure is the diamond structure and it is the decision making structure in flowcharts. Statement is written in the diamond and left right nodes are used for yes and no of the statement. It means it decides the flow of the algorithm.|
|The given structure is a parallelogram and it is used to prompt for inputs like asking to enter integer values in variables and also used to display results.|
This is the general information on flowcharts. In future posts we'll discuss specific flowcharts.
From above discussion it is clear that all three i.e. Algorithm, Flowchart and programming are interconnected.
Algorithm and flowchart indicates the way by which the problem can be solved or the method that can be adopted to solve the problem while programing is the implementing the method into a computer or machine.
In next article we'll discuss about various programming languages.