SlideShare a Scribd company logo
CHAPTER TWO
Algorithms and Flowcharts
Introduction
A program is a set of instruction gave to the computer to execute
successive operations leads to solve specific problem. In general to
solve any problem in computer we must follow these steps:
1. Analyze the problem.
2. Write an Algorithm.
3. Draw flowchart.
4. Convert the flowchart to program.
5. Run the program and test the solution.
1-1: Algorithms
It is a combination of phrases and events that can be arranged as steps
to solve a specific problem. That can be done by understanding this
problem whether it mathematic or logic before convert it to flow chart.
As example when we borrow some books from the library, the remaining
books number (NR) is the subtraction of the borrowed books number (NB)
from the original number (NO). To write the algorithm for this simple
problem we will follow these steps:
Input the number of books in the library (NO).
Input the number of borrowed books (NB).
Find the remaining books number (NR), NR = NO-NB
Print NR
1-2: Flowcharts
Flowcharts are graphs that represent the
formal view used to solve any problem.
Flowcharts help the programmer to write his
program. Flowcharts consist of a shapes
connected by a straight lines. The following
table shows these shapes and their operations.
Flow chart and algorithm working progress
We can summarize the use of algorithms and flowcharts as
follow:
1. To show the mathematical logic used to solve problems.
2. To show how the data processing is done.
3. Helps the programmer to write his program.
4. Divides the big problem to smaller parts.
5. To avoid the errors that occurred during writing the
program.
6. It is a middle step between problem difficulty and its
conversion to suitable program.
7. Easy to convert it to any programming language.
In general, we can divide flowcharts to a four
shapes (charts):
1. Simple sequence charts
2. Branched charts.
3. Single loop charts.
4. Multi-loop charts.
1-2-1: Simple sequence charts
The events arrangement of this type is as straight sequence from the beginning of
the program to the end (Event-1 to Event-n in figure below). This type of charts does
not have any branches or loops.
Flow chart and algorithm working progress
Flow chart and algorithm working progress
Flow chart and algorithm working progress
Flow chart and algorithm working progress
Flow chart and algorithm working progress
Flow chart and algorithm working progress
Flow chart and algorithm working progress
Flow chart and algorithm working progress
Flow chart and algorithm working progress
Flow chart and algorithm working progress
Flow chart and algorithm working progress
Ad

More Related Content

Similar to Flow chart and algorithm working progress (20)

Practical 01 (detailed)
Practical 01 (detailed)Practical 01 (detailed)
Practical 01 (detailed)
Muhammadalizardari
 
Practical 01 (detailed)
Practical 01 (detailed)Practical 01 (detailed)
Practical 01 (detailed)
Muhammadalizardari
 
lecture 5
 lecture 5 lecture 5
lecture 5
umardanjumamaiwada
 
Introduction to computer science
Introduction to computer scienceIntroduction to computer science
Introduction to computer science
umardanjumamaiwada
 
lecture 5
 lecture 5 lecture 5
lecture 5
umardanjumamaiwada
 
Introduction to computer science
Introduction to computer scienceIntroduction to computer science
Introduction to computer science
umardanjumamaiwada
 
Algorithm for computational problematic sit
Algorithm for computational problematic sitAlgorithm for computational problematic sit
Algorithm for computational problematic sit
Saurabh846965
 
Algorithm for computational problematic sit
Algorithm for computational problematic sitAlgorithm for computational problematic sit
Algorithm for computational problematic sit
Saurabh846965
 
Programming_Lecture_1.pptx
Programming_Lecture_1.pptxProgramming_Lecture_1.pptx
Programming_Lecture_1.pptx
shoaibkhan716300
 
Programming_Lecture_1.pptx
Programming_Lecture_1.pptxProgramming_Lecture_1.pptx
Programming_Lecture_1.pptx
shoaibkhan716300
 
Algorithm and flowchart.pptx
Algorithm and flowchart.pptxAlgorithm and flowchart.pptx
Algorithm and flowchart.pptx
MaheShiva
 
Algorithm and flowchart.pptx
Algorithm and flowchart.pptxAlgorithm and flowchart.pptx
Algorithm and flowchart.pptx
MaheShiva
 
Algorithm and flowchart2010
Algorithm and flowchart2010Algorithm and flowchart2010
Algorithm and flowchart2010
Jordan Delacruz
 
Algorithm and flowchart2010
Algorithm and flowchart2010Algorithm and flowchart2010
Algorithm and flowchart2010
Jordan Delacruz
 
Python Unit 1.pdfPython Notes for Bharathiar university syllabus
Python Unit 1.pdfPython Notes for Bharathiar university syllabusPython Unit 1.pdfPython Notes for Bharathiar university syllabus
Python Unit 1.pdfPython Notes for Bharathiar university syllabus
ANUSUYA S
 
Python Unit 1.pdfPython Notes for Bharathiar university syllabus
Python Unit 1.pdfPython Notes for Bharathiar university syllabusPython Unit 1.pdfPython Notes for Bharathiar university syllabus
Python Unit 1.pdfPython Notes for Bharathiar university syllabus
ANUSUYA S
 
module1 new c programming for begginers.pptx
module1 new c programming for begginers.pptxmodule1 new c programming for begginers.pptx
module1 new c programming for begginers.pptx
amruthavarshini849703
 
module1 new c programming for begginers.pptx
module1 new c programming for begginers.pptxmodule1 new c programming for begginers.pptx
module1 new c programming for begginers.pptx
amruthavarshini849703
 
Lect1-Algorithms-and-Flowchart PPT presentation
Lect1-Algorithms-and-Flowchart PPT presentationLect1-Algorithms-and-Flowchart PPT presentation
Lect1-Algorithms-and-Flowchart PPT presentation
gstagra
 
Lecture1-Algorithms-and-Flowchart-ppt.ppt
Lecture1-Algorithms-and-Flowchart-ppt.pptLecture1-Algorithms-and-Flowchart-ppt.ppt
Lecture1-Algorithms-and-Flowchart-ppt.ppt
samreen82
 
Introduction to computer science
Introduction to computer scienceIntroduction to computer science
Introduction to computer science
umardanjumamaiwada
 
Introduction to computer science
Introduction to computer scienceIntroduction to computer science
Introduction to computer science
umardanjumamaiwada
 
Algorithm for computational problematic sit
Algorithm for computational problematic sitAlgorithm for computational problematic sit
Algorithm for computational problematic sit
Saurabh846965
 
Algorithm for computational problematic sit
Algorithm for computational problematic sitAlgorithm for computational problematic sit
Algorithm for computational problematic sit
Saurabh846965
 
Programming_Lecture_1.pptx
Programming_Lecture_1.pptxProgramming_Lecture_1.pptx
Programming_Lecture_1.pptx
shoaibkhan716300
 
Programming_Lecture_1.pptx
Programming_Lecture_1.pptxProgramming_Lecture_1.pptx
Programming_Lecture_1.pptx
shoaibkhan716300
 
Algorithm and flowchart.pptx
Algorithm and flowchart.pptxAlgorithm and flowchart.pptx
Algorithm and flowchart.pptx
MaheShiva
 
Algorithm and flowchart.pptx
Algorithm and flowchart.pptxAlgorithm and flowchart.pptx
Algorithm and flowchart.pptx
MaheShiva
 
Algorithm and flowchart2010
Algorithm and flowchart2010Algorithm and flowchart2010
Algorithm and flowchart2010
Jordan Delacruz
 
Algorithm and flowchart2010
Algorithm and flowchart2010Algorithm and flowchart2010
Algorithm and flowchart2010
Jordan Delacruz
 
Python Unit 1.pdfPython Notes for Bharathiar university syllabus
Python Unit 1.pdfPython Notes for Bharathiar university syllabusPython Unit 1.pdfPython Notes for Bharathiar university syllabus
Python Unit 1.pdfPython Notes for Bharathiar university syllabus
ANUSUYA S
 
Python Unit 1.pdfPython Notes for Bharathiar university syllabus
Python Unit 1.pdfPython Notes for Bharathiar university syllabusPython Unit 1.pdfPython Notes for Bharathiar university syllabus
Python Unit 1.pdfPython Notes for Bharathiar university syllabus
ANUSUYA S
 
module1 new c programming for begginers.pptx
module1 new c programming for begginers.pptxmodule1 new c programming for begginers.pptx
module1 new c programming for begginers.pptx
amruthavarshini849703
 
module1 new c programming for begginers.pptx
module1 new c programming for begginers.pptxmodule1 new c programming for begginers.pptx
module1 new c programming for begginers.pptx
amruthavarshini849703
 
Lect1-Algorithms-and-Flowchart PPT presentation
Lect1-Algorithms-and-Flowchart PPT presentationLect1-Algorithms-and-Flowchart PPT presentation
Lect1-Algorithms-and-Flowchart PPT presentation
gstagra
 
Lecture1-Algorithms-and-Flowchart-ppt.ppt
Lecture1-Algorithms-and-Flowchart-ppt.pptLecture1-Algorithms-and-Flowchart-ppt.ppt
Lecture1-Algorithms-and-Flowchart-ppt.ppt
samreen82
 

More from BalaKrishnan466 (15)

Switch and control statement for c language
Switch and control statement for c languageSwitch and control statement for c language
Switch and control statement for c language
BalaKrishnan466
 
c-Looping-Statements-P-Suman statement for c
c-Looping-Statements-P-Suman statement for cc-Looping-Statements-P-Suman statement for c
c-Looping-Statements-P-Suman statement for c
BalaKrishnan466
 
Switch and control looping statement for C
Switch and control looping statement for CSwitch and control looping statement for C
Switch and control looping statement for C
BalaKrishnan466
 
Switch and looping statement for c language
Switch and looping statement for c languageSwitch and looping statement for c language
Switch and looping statement for c language
BalaKrishnan466
 
C language Looping and conditional statement
C language Looping and conditional statementC language Looping and conditional statement
C language Looping and conditional statement
BalaKrishnan466
 
Control structure and Looping statements
Control structure and Looping statementsControl structure and Looping statements
Control structure and Looping statements
BalaKrishnan466
 
Control structure and Looping statements
Control structure and Looping statementsControl structure and Looping statements
Control structure and Looping statements
BalaKrishnan466
 
Control structure and Looping statements
Control structure and Looping statementsControl structure and Looping statements
Control structure and Looping statements
BalaKrishnan466
 
Decision making in C(2020-2021) statements
Decision making in C(2020-2021) statementsDecision making in C(2020-2021) statements
Decision making in C(2020-2021) statements
BalaKrishnan466
 
C array and Initialisation and declaration
C array and Initialisation and declarationC array and Initialisation and declaration
C array and Initialisation and declaration
BalaKrishnan466
 
Basic operators and it's types in c languages
Basic operators and it's types in c languagesBasic operators and it's types in c languages
Basic operators and it's types in c languages
BalaKrishnan466
 
Queues operation using data structure in c
Queues operation using data structure in cQueues operation using data structure in c
Queues operation using data structure in c
BalaKrishnan466
 
Stack operation in data structure in c language
Stack operation in data structure in c languageStack operation in data structure in c language
Stack operation in data structure in c language
BalaKrishnan466
 
Algorithms and Flowchart usages in C laguage
Algorithms and Flowchart usages in C laguageAlgorithms and Flowchart usages in C laguage
Algorithms and Flowchart usages in C laguage
BalaKrishnan466
 
Data types and it's usage in c languages
Data types and it's usage in c languagesData types and it's usage in c languages
Data types and it's usage in c languages
BalaKrishnan466
 
Switch and control statement for c language
Switch and control statement for c languageSwitch and control statement for c language
Switch and control statement for c language
BalaKrishnan466
 
c-Looping-Statements-P-Suman statement for c
c-Looping-Statements-P-Suman statement for cc-Looping-Statements-P-Suman statement for c
c-Looping-Statements-P-Suman statement for c
BalaKrishnan466
 
Switch and control looping statement for C
Switch and control looping statement for CSwitch and control looping statement for C
Switch and control looping statement for C
BalaKrishnan466
 
Switch and looping statement for c language
Switch and looping statement for c languageSwitch and looping statement for c language
Switch and looping statement for c language
BalaKrishnan466
 
C language Looping and conditional statement
C language Looping and conditional statementC language Looping and conditional statement
C language Looping and conditional statement
BalaKrishnan466
 
Control structure and Looping statements
Control structure and Looping statementsControl structure and Looping statements
Control structure and Looping statements
BalaKrishnan466
 
Control structure and Looping statements
Control structure and Looping statementsControl structure and Looping statements
Control structure and Looping statements
BalaKrishnan466
 
Control structure and Looping statements
Control structure and Looping statementsControl structure and Looping statements
Control structure and Looping statements
BalaKrishnan466
 
Decision making in C(2020-2021) statements
Decision making in C(2020-2021) statementsDecision making in C(2020-2021) statements
Decision making in C(2020-2021) statements
BalaKrishnan466
 
C array and Initialisation and declaration
C array and Initialisation and declarationC array and Initialisation and declaration
C array and Initialisation and declaration
BalaKrishnan466
 
Basic operators and it's types in c languages
Basic operators and it's types in c languagesBasic operators and it's types in c languages
Basic operators and it's types in c languages
BalaKrishnan466
 
Queues operation using data structure in c
Queues operation using data structure in cQueues operation using data structure in c
Queues operation using data structure in c
BalaKrishnan466
 
Stack operation in data structure in c language
Stack operation in data structure in c languageStack operation in data structure in c language
Stack operation in data structure in c language
BalaKrishnan466
 
Algorithms and Flowchart usages in C laguage
Algorithms and Flowchart usages in C laguageAlgorithms and Flowchart usages in C laguage
Algorithms and Flowchart usages in C laguage
BalaKrishnan466
 
Data types and it's usage in c languages
Data types and it's usage in c languagesData types and it's usage in c languages
Data types and it's usage in c languages
BalaKrishnan466
 
Ad

Recently uploaded (20)

How to Manage Amounts in Local Currency in Odoo 18 Purchase
How to Manage Amounts in Local Currency in Odoo 18 PurchaseHow to Manage Amounts in Local Currency in Odoo 18 Purchase
How to Manage Amounts in Local Currency in Odoo 18 Purchase
Celine George
 
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptxU3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
Mayuri Chavan
 
Cultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptxCultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptx
UmeshTimilsina1
 
How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18
Celine George
 
Origin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theoriesOrigin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theories
PrachiSontakke5
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
Nguyen Thanh Tu Collection
 
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and GuestsLDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDM Mia eStudios
 
puzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tensepuzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tense
OlgaLeonorTorresSnch
 
How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18
Celine George
 
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
Celine George
 
All About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdfAll About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdf
TechSoup
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
Rock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian HistoryRock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian History
Virag Sontakke
 
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptxANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
Mayuri Chavan
 
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
parmarjuli1412
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...
parmarjuli1412
 
Cultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptxCultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptx
UmeshTimilsina1
 
How to Manage Amounts in Local Currency in Odoo 18 Purchase
How to Manage Amounts in Local Currency in Odoo 18 PurchaseHow to Manage Amounts in Local Currency in Odoo 18 Purchase
How to Manage Amounts in Local Currency in Odoo 18 Purchase
Celine George
 
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptxU3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
Mayuri Chavan
 
Cultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptxCultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptx
UmeshTimilsina1
 
How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18
Celine George
 
Origin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theoriesOrigin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theories
PrachiSontakke5
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
Nguyen Thanh Tu Collection
 
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and GuestsLDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDM Mia eStudios
 
puzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tensepuzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tense
OlgaLeonorTorresSnch
 
How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18
Celine George
 
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
Celine George
 
All About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdfAll About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdf
TechSoup
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
Rock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian HistoryRock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian History
Virag Sontakke
 
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptxANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
Mayuri Chavan
 
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
parmarjuli1412
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...
parmarjuli1412
 
Cultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptxCultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptx
UmeshTimilsina1
 
Ad

Flow chart and algorithm working progress

  • 1. CHAPTER TWO Algorithms and Flowcharts Introduction A program is a set of instruction gave to the computer to execute successive operations leads to solve specific problem. In general to solve any problem in computer we must follow these steps: 1. Analyze the problem. 2. Write an Algorithm. 3. Draw flowchart. 4. Convert the flowchart to program. 5. Run the program and test the solution.
  • 2. 1-1: Algorithms It is a combination of phrases and events that can be arranged as steps to solve a specific problem. That can be done by understanding this problem whether it mathematic or logic before convert it to flow chart. As example when we borrow some books from the library, the remaining books number (NR) is the subtraction of the borrowed books number (NB) from the original number (NO). To write the algorithm for this simple problem we will follow these steps: Input the number of books in the library (NO). Input the number of borrowed books (NB). Find the remaining books number (NR), NR = NO-NB Print NR
  • 3. 1-2: Flowcharts Flowcharts are graphs that represent the formal view used to solve any problem. Flowcharts help the programmer to write his program. Flowcharts consist of a shapes connected by a straight lines. The following table shows these shapes and their operations.
  • 5. We can summarize the use of algorithms and flowcharts as follow: 1. To show the mathematical logic used to solve problems. 2. To show how the data processing is done. 3. Helps the programmer to write his program. 4. Divides the big problem to smaller parts. 5. To avoid the errors that occurred during writing the program. 6. It is a middle step between problem difficulty and its conversion to suitable program. 7. Easy to convert it to any programming language.
  • 6. In general, we can divide flowcharts to a four shapes (charts): 1. Simple sequence charts 2. Branched charts. 3. Single loop charts. 4. Multi-loop charts.
  • 7. 1-2-1: Simple sequence charts The events arrangement of this type is as straight sequence from the beginning of the program to the end (Event-1 to Event-n in figure below). This type of charts does not have any branches or loops.
  翻译: