SlideShare a Scribd company logo
14
Most read
15
Most read
17
Most read
ALGORITHM
AND
FLOWCHART
PROBLEM ANALYSIS
INTRODUCTION
 Algorithm and flowchart are the powerful tools for learning
programming.
 An algorithm is a Step-by-step analysis of the process, while a flowchart
explains the steps of a program in a Graphical way.
 Algorithm and flowcharts helps to clarify all the steps for solving the
problem.
 For beginners, it is always recommended to first write algorithm and
draw flowchart forSolving a problem and then only write the program
ALGORITHM
 An algorithm is a sequence of steps to solve a particular problem
or algorithm is an ordered set of unambiguous steps that produces a result
and terminates in a finite time.
Algorithm has the following characteristics
• Input: An algorithm may or may not require input
• Output: Each algorithm is expected to produce at least one result
• Definiteness: Each instruction must be clear and unambiguous.
• Finiteness: If the instructions of an algorithm are executed, the algorithm
should terminate after finite number of steps
ALGORTITHM
Advantages of algorithm:
• It is a step-wise representation of a solution to a given problem,
which makes it easy to understand.
• An algorithm uses a definite procedure.
• It is not dependent on any programming language, so it is easy to
understand for anyone even without programming knowledge.
• Every step in an algorithm has its own logical sequence so it is easy
to debug.
FLOWCHART
 The first design of flowchart goes back to 1945 which was designed by
John Von Neumann.
 Unlike an algorithm, Flowchart uses different symbols to design a
solution to a problem.
 It is another commonly used programming tool. By looking at a Flowchart
one can understand the operations and sequence of operations
performed in a system.
 Flowchart is often considered as a blueprint of a design used for
solving a specific problem.
FLOWCHART
 Advantages of flowchart:
• Flowchart is an excellent way of communicating the logic of a program.
• Easy and efficient to analyze problem using flowchart.
• During program development cycle, the flowchart plays the role of a
blueprint, which makes program development process easier.
• After successful development of a program, it needs continuous timely
maintenance during the course of its operation. The flowchart makes
program or system maintenance easier.
• It is easy to convert the flowchart into any programming language code.
FLOWCHART
 Flowchart is diagrammatic /Graphical representation of sequence of steps to
solve a problem. To draw a flowchart following standard symbols are use
ASSIGNMENT
Assignment Symbol ( =) is used to assign value to the variable.
e.g. to assign value 5 to the variable HEIGHT, statement is
HEIGHT = 5
 The symbol ‘=’ is used in most of the programming language as an
assignment symbol, the same has been used in all the algorithms and
flowcharts in the manual.
 The statement C = A + B means that add the value stored in variable A and
variable B then assign/store the value in variable C.
 The statement R = R + 1 means that add I to the value stored in variable R and
then assign/store the new value in variable R, in other words increase the
value of variable R by 1
Operator
Mathematical Operator
Note: We can use keyword INPUT or READ or GET to accept input(s) /value(s)
and keywords PRINT or WRITE or DISPLAY to output the result(s)
Three Types of control structure
The algorithm and flowchart include following three types of control
structures.
1. Sequence: In the sequence structure, statements are placed one after the
other and the execution takes place starting from up to down.
2. Branching (Selection): In branch control, there is a condition and according
to a condition, a decision of either TRUE or FALSE is achieved. In the case of
TRUE, one of the two branches is explored; but in the case of FALSE condition,
the other alternative is taken. Generally, the ‘IF-THEN’ is used to represent
branch control.
3. Loop (Repetition): The Loop or Repetition allows a statement(s) to be
executed repeatedly based on certain loop condition e.g. WHILE, FOR loops.
Three Types of control structure
SEQUENCE BRANCHING
REPEATION/IT
ERATION
ALGORITHM AND FLOWCHART TO FIND SUM OF TWO
NUMBERS
ALGORITHM AND FLOWCHART TO FIND AREA AND
PERIMETER OF SQUARE
ALGORITHM AND FLOWCHART TO FIND THE
GREATEST OF TWO NUMBER
ALGORITHM AND FLOWCHART TO FIND THE
GREATEST OF THREE NUMBER
TO check whether given number is even or odd
Step 1: Start the program
Step 2: Input N
Step 3: if N%2==0
Step 4: print N is an even no.
Step 5: else
Step 6: Print N is an odd no.
Step 7: End of the program
Assignment:
1. Write an Algorithm and flowchart for
a) Read the marks of three subjects: Computer Science, Mathematics and Physics, out of 100
b) Calculate the aggregate marks
c) Calculate the percentage of marks
2. Write an Algorithm and flowchart for
Ask a user to enter a number. If the number is between 5 and 15, write the word GREEN.
If the number is between 15 and 25, write the word BLUE.
if the number is between 25 and 35, write the word ORANGE.
If it is any other number, write that ALL COLOURS ARE BEAUTIFUL
3. Write an Algorithm and flowchart for
To accepts only positive integers upto 100.
4. Write an Algorithm and flowchart for
calculate the factorial of a number (Hint: Factorial of 5, written as 5!=5*4*3*2*1 ) .
RECAP
1. What is Algorithm?
2. Why we need Algorithm?
3. What is difference between algorithm and program.
4.Define Flowchart

More Related Content

What's hot (20)

PPTX
Loop in C Properties & Applications
Emroz Sardar
 
PDF
Object Oriented Programming With Real-World Scenario
Durgesh Singh
 
PPT
Introduction to c programming
ABHISHEK fulwadhwa
 
PPT
introduction computer programming languages
BakhatAli3
 
PPT
Operators in C++
Sachin Sharma
 
PPT
Compiler Design
Mir Majid
 
PPTX
Automata Theory - Turing machine
Akila Krishnamoorthy
 
PPT
Programming language
Lia Safitri
 
PPT
Introduction to C++
Bharat Kalia
 
PPT
System engineering
Dr.M.Karthika parthasarathy
 
PDF
Big omega
Rajesh K Shukla
 
PPTX
Inline functions & macros
Anand Kumar
 
PPT
16717 functions in C++
LPU
 
PPTX
Compiler design
Thakur Ganeshsingh Thakur
 
PPTX
Operators in java
AbhishekMondal42
 
PPSX
Complete C++ programming Language Course
Vivek Singh Chandel
 
PPTX
Algorithmic Software Cost Modeling
Kasun Ranga Wijeweera
 
PDF
Theory of automata and formal language lab manual
Nitesh Dubey
 
PPTX
Algorithm Development
ALI RAZA
 
PPT
Compiler Construction introduction
Rana Ehtisham Ul Haq
 
Loop in C Properties & Applications
Emroz Sardar
 
Object Oriented Programming With Real-World Scenario
Durgesh Singh
 
Introduction to c programming
ABHISHEK fulwadhwa
 
introduction computer programming languages
BakhatAli3
 
Operators in C++
Sachin Sharma
 
Compiler Design
Mir Majid
 
Automata Theory - Turing machine
Akila Krishnamoorthy
 
Programming language
Lia Safitri
 
Introduction to C++
Bharat Kalia
 
System engineering
Dr.M.Karthika parthasarathy
 
Big omega
Rajesh K Shukla
 
Inline functions & macros
Anand Kumar
 
16717 functions in C++
LPU
 
Compiler design
Thakur Ganeshsingh Thakur
 
Operators in java
AbhishekMondal42
 
Complete C++ programming Language Course
Vivek Singh Chandel
 
Algorithmic Software Cost Modeling
Kasun Ranga Wijeweera
 
Theory of automata and formal language lab manual
Nitesh Dubey
 
Algorithm Development
ALI RAZA
 
Compiler Construction introduction
Rana Ehtisham Ul Haq
 

Similar to Algorithm and flowchart.pptx (20)

PDF
detail of flowchart and algorithm that are used in programmingpdf
ssuserf86fba
 
PDF
Algorithm Flowchart Manual ALGORITHM FLOWCHART MANUAL For STUDENTS
Alicia Edwards
 
PDF
Algorithm manual
EfendyMasuli
 
PPT
Chap6
artipradhan
 
PPSX
Algorithm and flowchart
Sachin Goyani
 
PPTX
Basic syntax : Algorithm,Flow chart
Prasanna R Kovath
 
PDF
final Unit 1-1.pdf
prakashvs7
 
PDF
ALGORITHM PPT GUIDE.pdf
meychu1
 
PPTX
Flowcharting and Algorithm
Zeinna Belle Desamito
 
PPTX
Flowcharts and algorithms
Student
 
PDF
C Programming Slides for 1st Year Engg students
MysoreYogesh
 
PDF
Logic Development and Algorithm.
NandiniSidana
 
PPT
Lect 3-4 Zaheer Abbas
Information Technology Center
 
PDF
Algorithm & Flowchart.pdf
Vpmv
 
PPTX
Algorithm and flowchart
Elizabeth de Leon Aler
 
PPT
Lecture_01-Problem_Solving[1]||ProgrammingFundamental.ppt
cosc242101003
 
PDF
Fundamental of Information Technology - UNIT 6
Shipra Swati
 
PPTX
UNIT 1.pptx
ShaswatSurya
 
PPT
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
ReshuReshma8
 
PPT
Lecture1-Algorithms-and-Flowchart-ppt.ppt
samreen82
 
detail of flowchart and algorithm that are used in programmingpdf
ssuserf86fba
 
Algorithm Flowchart Manual ALGORITHM FLOWCHART MANUAL For STUDENTS
Alicia Edwards
 
Algorithm manual
EfendyMasuli
 
Algorithm and flowchart
Sachin Goyani
 
Basic syntax : Algorithm,Flow chart
Prasanna R Kovath
 
final Unit 1-1.pdf
prakashvs7
 
ALGORITHM PPT GUIDE.pdf
meychu1
 
Flowcharting and Algorithm
Zeinna Belle Desamito
 
Flowcharts and algorithms
Student
 
C Programming Slides for 1st Year Engg students
MysoreYogesh
 
Logic Development and Algorithm.
NandiniSidana
 
Lect 3-4 Zaheer Abbas
Information Technology Center
 
Algorithm & Flowchart.pdf
Vpmv
 
Algorithm and flowchart
Elizabeth de Leon Aler
 
Lecture_01-Problem_Solving[1]||ProgrammingFundamental.ppt
cosc242101003
 
Fundamental of Information Technology - UNIT 6
Shipra Swati
 
UNIT 1.pptx
ShaswatSurya
 
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
ReshuReshma8
 
Lecture1-Algorithms-and-Flowchart-ppt.ppt
samreen82
 
Ad

More from MaheShiva (6)

PPTX
ppt Ncsc.pptx
MaheShiva
 
PPTX
PYTHON FEATURES.pptx
MaheShiva
 
PPTX
Number System[HEXADECIMAL].pptx
MaheShiva
 
PDF
004 NUMBER SYSTEM (1).pdf
MaheShiva
 
PPT
Forms,Frames.ppt
MaheShiva
 
PPT
Forms,Frames.ppt
MaheShiva
 
ppt Ncsc.pptx
MaheShiva
 
PYTHON FEATURES.pptx
MaheShiva
 
Number System[HEXADECIMAL].pptx
MaheShiva
 
004 NUMBER SYSTEM (1).pdf
MaheShiva
 
Forms,Frames.ppt
MaheShiva
 
Forms,Frames.ppt
MaheShiva
 
Ad

Recently uploaded (20)

PPTX
the very teaching plan extra ordinary.pptx
PamelaOdibeli1
 
PDF
ARC-101-B-4.pdfxxxxxxxxxxxxxxxxxxxxxxxxx
IzzyBaniquedBusto
 
PPTX
办理学历认证UHI在读证明信英国赫特福德郡大学毕业证范本,UHI成绩单修改
Taqyea
 
PPTX
Exploring Types of Rocks Educational Presentation rock forming james harold r...
jamescarllfelomino6
 
PPTX
一比一原版(UOIT毕业证)安省理工大学毕业证如何办理
Taqyea
 
PDF
cs603 ppts .pdf 222222222222222222222222
RabiaNazneen1
 
PDF
The Role of Logos as Identity Shapers (IFIC Logo)
Md. Mehedi Hasan Asif
 
PPTX
Chapter 2-3.pptxnsnsnsnsnsjsjsjsjejeusuejsjsj
hibaaqabdirisaaq331
 
PDF
EY-emeia-fso-assurance-viewpoint-technology (1).pdf
INKPPT
 
PPTX
Mainframe Modernization Services with Vrnexgen
tejushrie
 
PDF
🔴BUKTI KEMENANGAN HARI INI SENIN 14 JULI 2025 !!!🔴
GRAB
 
PPTX
sistem teknologi yang di desain untuk mahasiswa dan dosen agar memudahkan mer...
gamesonlya2rj
 
PDF
ARChitec-BUILDING-UTILITIES-2-PART-5.pdf
IzzyBaniquedBusto
 
PPTX
Bldg Mtc 8 Maintance documentation and audits - 25 (2).pptx
MwanamomoMpamba
 
DOCX
Redefining Master Plans for creating sustainable cities-Jharkhand Conference...
JIT KUMAR GUPTA
 
PDF
Plastic Foam as eco-friendly product in interiors
Disha Agrawal
 
DOCX
presente continuo luis (1).docx riklavoz
olivaresricardo141
 
PDF
placemaking 10 principles bY Berkley group
Radhika525487
 
PPTX
EDC_UNIT _I FINAL (1).pptx dhud and w ah yes
TEAKADAITROLLS
 
PPTX
Pitch_template_ppt_for_generation volunteer2024 .pptx
rinjanithiara99
 
the very teaching plan extra ordinary.pptx
PamelaOdibeli1
 
ARC-101-B-4.pdfxxxxxxxxxxxxxxxxxxxxxxxxx
IzzyBaniquedBusto
 
办理学历认证UHI在读证明信英国赫特福德郡大学毕业证范本,UHI成绩单修改
Taqyea
 
Exploring Types of Rocks Educational Presentation rock forming james harold r...
jamescarllfelomino6
 
一比一原版(UOIT毕业证)安省理工大学毕业证如何办理
Taqyea
 
cs603 ppts .pdf 222222222222222222222222
RabiaNazneen1
 
The Role of Logos as Identity Shapers (IFIC Logo)
Md. Mehedi Hasan Asif
 
Chapter 2-3.pptxnsnsnsnsnsjsjsjsjejeusuejsjsj
hibaaqabdirisaaq331
 
EY-emeia-fso-assurance-viewpoint-technology (1).pdf
INKPPT
 
Mainframe Modernization Services with Vrnexgen
tejushrie
 
🔴BUKTI KEMENANGAN HARI INI SENIN 14 JULI 2025 !!!🔴
GRAB
 
sistem teknologi yang di desain untuk mahasiswa dan dosen agar memudahkan mer...
gamesonlya2rj
 
ARChitec-BUILDING-UTILITIES-2-PART-5.pdf
IzzyBaniquedBusto
 
Bldg Mtc 8 Maintance documentation and audits - 25 (2).pptx
MwanamomoMpamba
 
Redefining Master Plans for creating sustainable cities-Jharkhand Conference...
JIT KUMAR GUPTA
 
Plastic Foam as eco-friendly product in interiors
Disha Agrawal
 
presente continuo luis (1).docx riklavoz
olivaresricardo141
 
placemaking 10 principles bY Berkley group
Radhika525487
 
EDC_UNIT _I FINAL (1).pptx dhud and w ah yes
TEAKADAITROLLS
 
Pitch_template_ppt_for_generation volunteer2024 .pptx
rinjanithiara99
 

Algorithm and flowchart.pptx

  • 2. INTRODUCTION  Algorithm and flowchart are the powerful tools for learning programming.  An algorithm is a Step-by-step analysis of the process, while a flowchart explains the steps of a program in a Graphical way.  Algorithm and flowcharts helps to clarify all the steps for solving the problem.  For beginners, it is always recommended to first write algorithm and draw flowchart forSolving a problem and then only write the program
  • 3. ALGORITHM  An algorithm is a sequence of steps to solve a particular problem or algorithm is an ordered set of unambiguous steps that produces a result and terminates in a finite time. Algorithm has the following characteristics • Input: An algorithm may or may not require input • Output: Each algorithm is expected to produce at least one result • Definiteness: Each instruction must be clear and unambiguous. • Finiteness: If the instructions of an algorithm are executed, the algorithm should terminate after finite number of steps
  • 4. ALGORTITHM Advantages of algorithm: • It is a step-wise representation of a solution to a given problem, which makes it easy to understand. • An algorithm uses a definite procedure. • It is not dependent on any programming language, so it is easy to understand for anyone even without programming knowledge. • Every step in an algorithm has its own logical sequence so it is easy to debug.
  • 5. FLOWCHART  The first design of flowchart goes back to 1945 which was designed by John Von Neumann.  Unlike an algorithm, Flowchart uses different symbols to design a solution to a problem.  It is another commonly used programming tool. By looking at a Flowchart one can understand the operations and sequence of operations performed in a system.  Flowchart is often considered as a blueprint of a design used for solving a specific problem.
  • 6. FLOWCHART  Advantages of flowchart: • Flowchart is an excellent way of communicating the logic of a program. • Easy and efficient to analyze problem using flowchart. • During program development cycle, the flowchart plays the role of a blueprint, which makes program development process easier. • After successful development of a program, it needs continuous timely maintenance during the course of its operation. The flowchart makes program or system maintenance easier. • It is easy to convert the flowchart into any programming language code.
  • 7. FLOWCHART  Flowchart is diagrammatic /Graphical representation of sequence of steps to solve a problem. To draw a flowchart following standard symbols are use
  • 8. ASSIGNMENT Assignment Symbol ( =) is used to assign value to the variable. e.g. to assign value 5 to the variable HEIGHT, statement is HEIGHT = 5  The symbol ‘=’ is used in most of the programming language as an assignment symbol, the same has been used in all the algorithms and flowcharts in the manual.  The statement C = A + B means that add the value stored in variable A and variable B then assign/store the value in variable C.  The statement R = R + 1 means that add I to the value stored in variable R and then assign/store the new value in variable R, in other words increase the value of variable R by 1
  • 9. Operator Mathematical Operator Note: We can use keyword INPUT or READ or GET to accept input(s) /value(s) and keywords PRINT or WRITE or DISPLAY to output the result(s)
  • 10. Three Types of control structure The algorithm and flowchart include following three types of control structures. 1. Sequence: In the sequence structure, statements are placed one after the other and the execution takes place starting from up to down. 2. Branching (Selection): In branch control, there is a condition and according to a condition, a decision of either TRUE or FALSE is achieved. In the case of TRUE, one of the two branches is explored; but in the case of FALSE condition, the other alternative is taken. Generally, the ‘IF-THEN’ is used to represent branch control. 3. Loop (Repetition): The Loop or Repetition allows a statement(s) to be executed repeatedly based on certain loop condition e.g. WHILE, FOR loops.
  • 11. Three Types of control structure SEQUENCE BRANCHING REPEATION/IT ERATION
  • 12. ALGORITHM AND FLOWCHART TO FIND SUM OF TWO NUMBERS
  • 13. ALGORITHM AND FLOWCHART TO FIND AREA AND PERIMETER OF SQUARE
  • 14. ALGORITHM AND FLOWCHART TO FIND THE GREATEST OF TWO NUMBER
  • 15. ALGORITHM AND FLOWCHART TO FIND THE GREATEST OF THREE NUMBER
  • 16. TO check whether given number is even or odd Step 1: Start the program Step 2: Input N Step 3: if N%2==0 Step 4: print N is an even no. Step 5: else Step 6: Print N is an odd no. Step 7: End of the program
  • 17. Assignment: 1. Write an Algorithm and flowchart for a) Read the marks of three subjects: Computer Science, Mathematics and Physics, out of 100 b) Calculate the aggregate marks c) Calculate the percentage of marks 2. Write an Algorithm and flowchart for Ask a user to enter a number. If the number is between 5 and 15, write the word GREEN. If the number is between 15 and 25, write the word BLUE. if the number is between 25 and 35, write the word ORANGE. If it is any other number, write that ALL COLOURS ARE BEAUTIFUL 3. Write an Algorithm and flowchart for To accepts only positive integers upto 100. 4. Write an Algorithm and flowchart for calculate the factorial of a number (Hint: Factorial of 5, written as 5!=5*4*3*2*1 ) .
  • 18. RECAP 1. What is Algorithm? 2. Why we need Algorithm? 3. What is difference between algorithm and program. 4.Define Flowchart