Flowchart & Pseudocode
Flowchart & Pseudocode
"
TIMES COME
ACROSS PROBLEMS
WE HAVE TO SOLVE,
AND SOMETIMES
FRIENDS CAN HELP
US, TOO!"
A computer is a blank
canvas
Waiting for you to
instruct.
Plan out with
Written by P.Jones 2014
pseudocode
Then program to
construct.
Created by P.Jones 2014
DIFFERENCE BETWEEN ALGORITHM,
PSEUDOCODE,FLOWCHART AND PROGRAM
Algorithm :
Systematic logical approach which is a well-
defined, step-by-step procedure that allows a
computer to solve a problem.
Algorithms can be expressed using natural
language, flowcharts, etc.
Informal definition of an algorithm
used in a computer
EXAMPLE : CONVERT TEMPERATURE FROM
FAHRENHEIT (℉) TO CELSIUS (℃)
Algorithm:
Step 1: Read temperature in Fahrenheit,
Step 3: Print C,
FLOWCHART
A flowchart is the graphical or pictorial
representation of an algorithm with the help
of different symbols, shapes and arrows in
order to demonstrate a process or a program.
The main purpose of a flowchart is to
flowchart
EXAMPLE : CONVERT TEMPERATURE
FROM FAHRENHEIT (℉) TO CELSIUS (℃)
PSEUDOCODE :
It is a simpler version of a
programming code in plain English
which uses short phrases to write code
for a program before it is implemented
in a specific programming language.
It does not have a specific
COMPUTE C = (F - 32) * 5 / 9
RETURN C
Pseudocode for three
constructs
PROGRAM :
It is exact code written for problem following all
the rules of the programming language.
#include <bits/stdc++.h>
using namespace std;
float Conversion(float n)
{
return (n - 32.0) * 5.0 / 9.0;
}
// driver code
int main()
{
float n = 40;
cout << Conversion(n);
return 0;
}
FLOW CHART SYMBOLS
EXAMPLE : STUDENT ADMISSION
PROCESS
Questions
• In computer science, algorithm refers to a
pictorial representation of a flowchart.
a) True
b) False
a) Decision
b) Initiation
c) Initialization
d) I/O