Notes on Flowchart | Grade 12 > Computer Science > Algorithm and Flowchart | KULLABS.COM

Notes, Exercises, Videos, Tests and Things to Remember on Flowchart

Please scroll down to get to the study materials.

• Note
• Things to remember

### INTRODUCTION

A flowchart is a diagram showing a sequence of events that describes the activities necessary to the solution to a problem. It is drawn using a set of conventional symbols. The symbols are connected by the arrowhead that indicates the order in which activities will occur. The different types of symbols that are used in flowchart are:

Source:www.conceptdraw.com

#### Features of Flowchart

Flowcharts have some basic features. The basic of a flowchart is its origination from where it begins.

• Origination: Flowchart starts from the source of the collection of data. The data are the information to the computer. The original documents or manuscripts are the source documents that are the sources of information. The data goes to the second step.
• Input: The data information is given to the computer so that the computer understands. The input section of the flowchart shows a process of getting data and instruction through a suitable device.
• Processing: The data is processed by the computer for which instructions are necessary. The processed results are stored or used in further calculations. The processing symbols contain the information about the processing mechanism.
• Output: The output of the processing may go for further processing cycle or the next step while data are processed in the computer.
• Storage: The data is stored in the disks. The data and information are stored in the computer’s memory for further reference.

#### Types of Flowchart

The major two types of flowcharts are:

1. System flowchart and
2. Program flowchart

1. System Flowchart

System flowcharts give the direction of a program so that programs or modules are controlled. They display all the codes to be used in the main program and different modules. Such flowcharts give detail information to the programmer. This is like a processing machine. For example, information processing cycle, manufacturing industry, etc.

Source: www.slideshare.net

The above structure is a master block diagram of system flowchart. Each and every item is sub-divided into different modules and every module consists of numerous programs.

2. Program Flowchart

A flowchart which is used to process or solve a problem through a program is called program flowchart. The natures of problem differ from time to time. Use of different signs and symbols for developing different programs represent program flowchart. So, the size of a program determines flowchart.

1. They are clear graphical representations of the various paths that must be followed to perform the acts to accomplish the goal of the program.
2. They provide help to make later modifications.
3. It is very convenient to write algorithm and flowchart followed by the program codes instead of writing the programs directly.
4. The advancement result of the algorithm is flowchart.
5. Flowcharts enable to read the program very easily.
6. With the help of flowchart, programs can be written in any language.

1. Flowcharts are new to the beginning programmer.
2. It is a time-consuming task for the programmer.
3. It is a tedious task to make modifications in flowchart after completing the program when required.
4. Sometimes, the flowcharts are not clear to another programmer except the one who had designed it.

### Flowchart Structures

Flowcharts can be very simple where few symbols can depict the logic. They can be complex too. There are three constructs of a flowchart. They are:

1. Sequence:where the information can flow in straight line
2. Selection:where the decision is made according to some predefined condition.
3. Repetition:where the logic can repeat in a loop, i.e., where a sequence of steps is repeated until the desired output is obtained.

Flowchart Examples

1. Write an algorithm and flowchart to make a telephone call.

Algorithm

 Step 1: Remember or read the telephone number. Step 2: Lift the receiver Step 3: Is there a dial tone? If yes, then dial telephone, go to step 4. { If no, then put down the receiver. Go to step 2} Step 4: Speak Step 5: Put down the receiver.

Flowchart

1. Algorithm and flowchart to calculate the interest of principal amount in N number of years.

Algorithm

 Step 1: Start Step 2: Read principle, Rate and Time Step 3: Multiply principal * Rate * Time Step 4: Divide by 100 Step 5: Write the answer Step 6: Any more calculations? { If yes, then go to step 2 If No } Step 7: Stop

Flowchart

1. Write an algorithm, flowchart and program to find the total and average marks of 10 students for 7 subjects and print the result.

Algorithm

 Step 1: Start Step 2: Subject = 1 Step 3: Input mark for this Subject Step 4: Add marks and store into a variable Step 5: Are all subjects (7 subjects) done? { If No, then increase the subject number and go to step 3. If yes, then go to step 6 Step 6: Print the sum Step 7: Find average (divide by 7) Step 8: Print the sum and average Step 9: Are all (10 students done)? { If No, then increase the student number and go to step 2 If yes, then go to step 9} Step 9: End

Flowchart

##### Program Structures

A program is initiated with a declaration of data types, definition of function procedures, subprograms or sub-procedures. As soon as the program is initiated, the data types are declared in the program. After the data are defined, the data are processed in different order. The order at which the program codes are written can be classified in the following categories.

1. Sequence
2. Control Structures
3. Selection
4. Repetition

Sequence: When a program is written in linear fashion, the program is in a sequence. The program initiates at a certain level and continues till the last command or statement. Such fashion is useful when the program is small and less logical.

Control structures: The program which contains certain logic, jumps from one point to another and certain repetition possesses control structures. The control structures mostly used are:

1. use of goto ... statement
2. use of on … goto … statement
3. user of if … then, if … then … else statement
4. use of embedded if …else if … else if … else … end if statement.

Selections: A selection is choosing options. The program provides different options. The user can choose an option as required. The common statements used for this activity are:

1. Select
2. Case
3. Switch

These statements provide choices for menu driven programs. Although the syntax and users in the different programming language are similar, we cannot rule out the variation. Therefore, the reader will have to consult the necessary manual referred to the particular programming language for the complete idea of these selections.

Repetitions (Loops): When a program goes through a loop for certain times repeatedly, it is known as repetition. There are two types of loops. They are; finite loop and infinite loop. The infinite loop stops after executing certain program codes or repetitions.

An infinite loop never ends. The loops are constructs of programs. The first value that initiates program loop is called initial value and the last value reached in a finite loop is known as a sentinel value. When the sentinel value is obtained, the program stops looping. The different methods of creating loops are:

1. Do loop
2. While loop
3. For loop

References:

Khanal, R.C. Khanal, R.C. Computer Concept for XII. Pashupatigriha Marga, Thapathali, Kathmandu, Nepal: Ekta Books Distributors Pvt. Ltd., 2010. 119-129.

Adhikari, Deepak Kumar.,et.al., Computer Science XII,Asia Publication Pvt.Ltd

1.  It is a diagrammatic graphical representation of the algorithm written in a human language in sequence form it is called a Flowchart.
2. A flowchart used to process or solve a problem through a program is called program flowchart.
3. System flowcharts give the direction of a program so that programs or modules are controlled.
4. It is very convenient to write algorithm and flowchart followed by the program codes instead of writing the programs directly and flowchart enables to read the program very easily these are the advantages of a flowchart.
.

0%

## ASK ANY QUESTION ON Flowchart

No discussion on this note yet. Be first to comment on this note