SlideShare ist ein Scribd-Unternehmen logo
1 von 22
PROBLEM SOLVING
 Problem solving involves:
 Analysis
 Algorithm or pseudo code or flow chart or combination
of them.
PROBLEMS ANALYSIS
 Identify problems:
 Input
 Output
 Process
INPUT PROCESS OUTPUT
ALGORITHM
 Algorithm
 Any computing problem can be done by executing a
series of actions in a specific order.
 A procedure for solving a problem in terms of the
actions to be executed and the order in which these
actions are to be executed is called an algorithm.
 Is a logical solution that is inline with our daily language
or mother tongue language.
ALGORITHM
Start
1. Set sum = 0 and average = 0
2. Read 3 numbers: nom1, nom2, nom3
3. Add 3 numbers
4. Calculate the average, average = (sum)/3
5. Print 3 numbers(nom1, nom2, nom3) and
the average
End
PSEUDO CODE
 Pseudo code
Is an artificial and informal language
Usually it is use English language
Quite similar to programming language
The purpose of pseudo code is to make
humans who do not understand
computer programming can easily
understand the flow of the problem
solving.
PSEUDO CODE
START
SET sum = 0, average = 0
INPUT nom1, nom2, nom3
sum = nom1 + nom2 + nom3
average = sum / 3
PRINT nom1, nom2, nom3
PRINT average
END
FLOW CHART
 Flow Chart
 It is represents by using geometry shapes with
connected line
 Use a standard symbol
FLOW CHART
TERMINAL
Indicates the beginning or end of an algorithm
PROCESS
Indicates an input computational or data
manipulation.
INPUT / OUTPUT
Indicates an input or output operation
FLOW CHART
DECISION
Indicates a decision point in the algorithm
CONNECTOR
Indicates an entry to or exit from another
part of the flowchart
FLOW LINES
Used to connect the flowchart symbols and
indicate the logic flow
LOOP
Indicates the initial, final and increment
values of a loop
CONTROL STRUCTURE
•It’s a technique in producing program logic which is simple and
easy to understand
•.It show the problem solution whether it’s a jujukan, selection
or repetition control structure or the combination of two or
three control structure.
•Every programmer should analyze the problem to indentify the
suitable control structure that must use .
CONTROL STRUCTURE
 There are three type of control structure :
 Sequence
 Selection
 Repetition
SEQUENCE CONTROL STRUCTURE
 Sequence control structure used when a problem is
solved sequentially from start to end. Every
instruction is perform once only. It used to solve
problems that easy. This solution does not involve
any condition and there is no repetition of
instructions.
CONTROL STRUCTURE :
in
Process 1
Process 2
Process 3
out
 Example 1:
Kebajikan FTMK mengenakan yuran sebanyak 1%
dari jumlah gaji setiap ahli untuk tabung
kebajikannya. Lukiskan cartalir dan tuliskan
aturcara untuk mencetak nama dan yuran yang
diterima dari seorang ahlinya.
Anaylze :
input : name, salary
process : fee = salary * 1%
output : fee
FLOWCHART :
start
end
Input
salary
Print fee
Fee = 1% * salary
# include <iostream.h>
// Program to calculate and display club fee
main ()
{ // Initialization of variables
char name [15]; // staff name
float salary =0, fee=0; // salary and fee
// Data entry section
cout << “please enter staff name";
cin >> name;
cout << “please enter salary ";
cin >> gaji;
// Processing section
fee = salary *.01;
// Printing Section
cout << “Staff name “<<name<<endl;
cout << "n The club fee is RM"<<fee;
// end of programme
return 0;
}
EXAMPLE 2
 Assume N number of students have to take
MTS1033 course in UPSI and each student is
required to buy C++ book with a price of RMX. The
publisher will get 10% profit for each book that is
sold. Write a program to calculate and print the
profit that earned by the publisher.
CONTROL STRUCTURE - SELECTION
 Selection control structure is used when the execution of
instructions are depend on the result of a decision/selection that
the program must make
if ..else Statement
Format :
if <(condition)> statement1;
else statement2;
or
if <(condition)> no semicolon
statement1;
else no semicolon
statement2;
SELECTION CONTROL STRUCTURE -FLOWCHART
condition
Statement 2
statement 1
y
n
If the value of condition is true, then statement1 will be
executed, otherwise statement2 will be executed
SELECTION CONTROL STRUCTURE -FLOWCHART
syarat
Kenyataan 1
y
t
Selection without else statement
if <(condition)> or if <(condition)> statement1
{ statement1
statement2
:
}
CONTROL STRUCTURE -SELECTION
 Cost of printing price for coloured poster is RM2000
for the first 500 pieces and RM1000 for black and
white poster. For each piece above then 500, the
cost is RM2 for coloured and RM1.50for the black
an white. Write a pseudo code and a programme to
calculate payment that need to be paid by a
customer.

Weitere ähnliche Inhalte

Was ist angesagt?

Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1rajnidhiman
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowchartsSamuel Igbanogu
 
Flowchart and algorithem
Flowchart and algorithemFlowchart and algorithem
Flowchart and algorithemehsanullah786
 
Flowchart and algorithm
Flowchart and algorithmFlowchart and algorithm
Flowchart and algorithmDHANIK VIKRANT
 
Computer programming:Know How to Flowchart
Computer  programming:Know How to FlowchartComputer  programming:Know How to Flowchart
Computer programming:Know How to FlowchartAngelo Tomboc
 
Pseudocode algorithim flowchart
Pseudocode algorithim flowchartPseudocode algorithim flowchart
Pseudocode algorithim flowchartfika sweety
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1luhkahreth
 
Algorithms and flowcharts ppt (seminar presentation)..
 Algorithms and flowcharts  ppt (seminar presentation).. Algorithms and flowcharts  ppt (seminar presentation)..
Algorithms and flowcharts ppt (seminar presentation)..Nagendra N
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowchartskhair20
 
Unit 3 Foc
Unit  3 FocUnit  3 Foc
Unit 3 FocJAYA
 
Csc 130 class 2 problem analysis and flow charts(2)
Csc 130 class 2   problem analysis and flow charts(2)Csc 130 class 2   problem analysis and flow charts(2)
Csc 130 class 2 problem analysis and flow charts(2)Puneet narula
 
Algorithmsandflowcharts2
Algorithmsandflowcharts2Algorithmsandflowcharts2
Algorithmsandflowcharts2Darlene Interno
 
Introduction to flowchart
Introduction to flowchartIntroduction to flowchart
Introduction to flowchartJordan Delacruz
 
Algorithms and flowcharts1
Algorithms and flowcharts1Algorithms and flowcharts1
Algorithms and flowcharts1Lincoln School
 
1153 algorithms%20and%20flowcharts
1153 algorithms%20and%20flowcharts1153 algorithms%20and%20flowcharts
1153 algorithms%20and%20flowchartsDani Garnida
 

Was ist angesagt? (20)

Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
 
Flow chart
Flow chartFlow chart
Flow chart
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowcharts
 
Flowchart and algorithem
Flowchart and algorithemFlowchart and algorithem
Flowchart and algorithem
 
Flowchart and algorithm
Flowchart and algorithmFlowchart and algorithm
Flowchart and algorithm
 
Flowchart and algorithm
Flowchart and algorithmFlowchart and algorithm
Flowchart and algorithm
 
Computer programming:Know How to Flowchart
Computer  programming:Know How to FlowchartComputer  programming:Know How to Flowchart
Computer programming:Know How to Flowchart
 
Pseudocode algorithim flowchart
Pseudocode algorithim flowchartPseudocode algorithim flowchart
Pseudocode algorithim flowchart
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
 
Algorithms and flowcharts ppt (seminar presentation)..
 Algorithms and flowcharts  ppt (seminar presentation).. Algorithms and flowcharts  ppt (seminar presentation)..
Algorithms and flowcharts ppt (seminar presentation)..
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowcharts
 
Unit 3 Foc
Unit  3 FocUnit  3 Foc
Unit 3 Foc
 
Csc 130 class 2 problem analysis and flow charts(2)
Csc 130 class 2   problem analysis and flow charts(2)Csc 130 class 2   problem analysis and flow charts(2)
Csc 130 class 2 problem analysis and flow charts(2)
 
Algorithmsandflowcharts2
Algorithmsandflowcharts2Algorithmsandflowcharts2
Algorithmsandflowcharts2
 
Introduction to flowchart
Introduction to flowchartIntroduction to flowchart
Introduction to flowchart
 
Algorithms and flowcharts1
Algorithms and flowcharts1Algorithms and flowcharts1
Algorithms and flowcharts1
 
1153 algorithms%20and%20flowcharts
1153 algorithms%20and%20flowcharts1153 algorithms%20and%20flowcharts
1153 algorithms%20and%20flowcharts
 
3 algorithm-and-flowchart
3 algorithm-and-flowchart3 algorithm-and-flowchart
3 algorithm-and-flowchart
 
Flow chart programming
Flow chart programmingFlow chart programming
Flow chart programming
 

Ähnlich wie Problem Solving Flowcharts & Pseudocode

Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchartSachin Goyani
 
Software develop....
Software develop.... Software develop....
Software develop.... GCWUS
 
PDLC.pptx
PDLC.pptxPDLC.pptx
PDLC.pptxmarysj3
 
What is algorithm
What is algorithmWhat is algorithm
What is algorithmmshoaib15
 
Pseudo code.pptx
Pseudo code.pptxPseudo code.pptx
Pseudo code.pptxChaya64047
 
2.3 Apply the different types of algorithm to solve problem
2.3 Apply the different types of algorithm to solve problem2.3 Apply the different types of algorithm to solve problem
2.3 Apply the different types of algorithm to solve problemFrankie Jones
 
Introduction to Problem Solving Techniques- Python
Introduction to Problem Solving Techniques- PythonIntroduction to Problem Solving Techniques- Python
Introduction to Problem Solving Techniques- PythonPriyankaC44
 
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.pptLecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.pptReshuReshma8
 
Algorithm and flowchart.pptx
Algorithm and flowchart.pptxAlgorithm and flowchart.pptx
Algorithm and flowchart.pptxMaheShiva
 
Basic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and FlowchartsBasic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and Flowchartsmoazwinner
 
Pengenalan kepada pengaturcaraan berstruktur
Pengenalan kepada pengaturcaraan berstrukturPengenalan kepada pengaturcaraan berstruktur
Pengenalan kepada pengaturcaraan berstrukturUnit Kediaman Luar Kampus
 
Ch1 principles of software development
Ch1 principles of software developmentCh1 principles of software development
Ch1 principles of software developmentHattori Sidek
 
c_algo_flowchart.pdf
c_algo_flowchart.pdfc_algo_flowchart.pdf
c_algo_flowchart.pdfsimmis5
 
Fundamentals of Programming Lecture #1.pptx
Fundamentals of Programming Lecture #1.pptxFundamentals of Programming Lecture #1.pptx
Fundamentals of Programming Lecture #1.pptxEyasu46
 
2-Algorithms and Complexit data structurey.pdf
2-Algorithms and Complexit data structurey.pdf2-Algorithms and Complexit data structurey.pdf
2-Algorithms and Complexit data structurey.pdfishan743441
 
Algorithm Flowchart Manual ALGORITHM FLOWCHART MANUAL For STUDENTS
Algorithm   Flowchart Manual ALGORITHM   FLOWCHART MANUAL For STUDENTSAlgorithm   Flowchart Manual ALGORITHM   FLOWCHART MANUAL For STUDENTS
Algorithm Flowchart Manual ALGORITHM FLOWCHART MANUAL For STUDENTSAlicia Edwards
 

Ähnlich wie Problem Solving Flowcharts & Pseudocode (20)

Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
UNIT 1.pptx
UNIT 1.pptxUNIT 1.pptx
UNIT 1.pptx
 
Lect 3-4 Zaheer Abbas
Lect 3-4 Zaheer AbbasLect 3-4 Zaheer Abbas
Lect 3-4 Zaheer Abbas
 
Software develop....
Software develop.... Software develop....
Software develop....
 
PDLC.pptx
PDLC.pptxPDLC.pptx
PDLC.pptx
 
What is algorithm
What is algorithmWhat is algorithm
What is algorithm
 
Pseudo code.pptx
Pseudo code.pptxPseudo code.pptx
Pseudo code.pptx
 
2.3 Apply the different types of algorithm to solve problem
2.3 Apply the different types of algorithm to solve problem2.3 Apply the different types of algorithm to solve problem
2.3 Apply the different types of algorithm to solve problem
 
Introduction to Problem Solving Techniques- Python
Introduction to Problem Solving Techniques- PythonIntroduction to Problem Solving Techniques- Python
Introduction to Problem Solving Techniques- Python
 
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.pptLecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
 
Algorithm and flowchart.pptx
Algorithm and flowchart.pptxAlgorithm and flowchart.pptx
Algorithm and flowchart.pptx
 
Basic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and FlowchartsBasic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and Flowcharts
 
Pengenalan kepada pengaturcaraan berstruktur
Pengenalan kepada pengaturcaraan berstrukturPengenalan kepada pengaturcaraan berstruktur
Pengenalan kepada pengaturcaraan berstruktur
 
Ch1 principles of software development
Ch1 principles of software developmentCh1 principles of software development
Ch1 principles of software development
 
c_algo_flowchart.pdf
c_algo_flowchart.pdfc_algo_flowchart.pdf
c_algo_flowchart.pdf
 
Fundamentals of Programming Lecture #1.pptx
Fundamentals of Programming Lecture #1.pptxFundamentals of Programming Lecture #1.pptx
Fundamentals of Programming Lecture #1.pptx
 
Fundamentals of Programming Chapter 3
Fundamentals of Programming Chapter 3Fundamentals of Programming Chapter 3
Fundamentals of Programming Chapter 3
 
2-Algorithms and Complexit data structurey.pdf
2-Algorithms and Complexit data structurey.pdf2-Algorithms and Complexit data structurey.pdf
2-Algorithms and Complexit data structurey.pdf
 
Algorithm Flowchart Manual ALGORITHM FLOWCHART MANUAL For STUDENTS
Algorithm   Flowchart Manual ALGORITHM   FLOWCHART MANUAL For STUDENTSAlgorithm   Flowchart Manual ALGORITHM   FLOWCHART MANUAL For STUDENTS
Algorithm Flowchart Manual ALGORITHM FLOWCHART MANUAL For STUDENTS
 
Algorithm manual
Algorithm manualAlgorithm manual
Algorithm manual
 

Mehr von Unit Kediaman Luar Kampus (8)

Fungsi (i)
Fungsi (i)Fungsi (i)
Fungsi (i)
 
Fail
FailFail
Fail
 
Fungsi (ii)
Fungsi (ii)Fungsi (ii)
Fungsi (ii)
 
Basic pengaturcaraan
Basic pengaturcaraanBasic pengaturcaraan
Basic pengaturcaraan
 
Latihan 2
Latihan 2Latihan 2
Latihan 2
 
Pengaturcaraan asas
Pengaturcaraan asasPengaturcaraan asas
Pengaturcaraan asas
 
Looping
LoopingLooping
Looping
 
Presentation2
Presentation2Presentation2
Presentation2
 

Kürzlich hochgeladen

Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 

Kürzlich hochgeladen (20)

Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 

Problem Solving Flowcharts & Pseudocode

  • 1. PROBLEM SOLVING  Problem solving involves:  Analysis  Algorithm or pseudo code or flow chart or combination of them.
  • 2. PROBLEMS ANALYSIS  Identify problems:  Input  Output  Process INPUT PROCESS OUTPUT
  • 3. ALGORITHM  Algorithm  Any computing problem can be done by executing a series of actions in a specific order.  A procedure for solving a problem in terms of the actions to be executed and the order in which these actions are to be executed is called an algorithm.  Is a logical solution that is inline with our daily language or mother tongue language.
  • 4. ALGORITHM Start 1. Set sum = 0 and average = 0 2. Read 3 numbers: nom1, nom2, nom3 3. Add 3 numbers 4. Calculate the average, average = (sum)/3 5. Print 3 numbers(nom1, nom2, nom3) and the average End
  • 5. PSEUDO CODE  Pseudo code Is an artificial and informal language Usually it is use English language Quite similar to programming language The purpose of pseudo code is to make humans who do not understand computer programming can easily understand the flow of the problem solving.
  • 6. PSEUDO CODE START SET sum = 0, average = 0 INPUT nom1, nom2, nom3 sum = nom1 + nom2 + nom3 average = sum / 3 PRINT nom1, nom2, nom3 PRINT average END
  • 7. FLOW CHART  Flow Chart  It is represents by using geometry shapes with connected line  Use a standard symbol
  • 8. FLOW CHART TERMINAL Indicates the beginning or end of an algorithm PROCESS Indicates an input computational or data manipulation. INPUT / OUTPUT Indicates an input or output operation
  • 9. FLOW CHART DECISION Indicates a decision point in the algorithm CONNECTOR Indicates an entry to or exit from another part of the flowchart FLOW LINES Used to connect the flowchart symbols and indicate the logic flow LOOP Indicates the initial, final and increment values of a loop
  • 10. CONTROL STRUCTURE •It’s a technique in producing program logic which is simple and easy to understand •.It show the problem solution whether it’s a jujukan, selection or repetition control structure or the combination of two or three control structure. •Every programmer should analyze the problem to indentify the suitable control structure that must use .
  • 11. CONTROL STRUCTURE  There are three type of control structure :  Sequence  Selection  Repetition
  • 12. SEQUENCE CONTROL STRUCTURE  Sequence control structure used when a problem is solved sequentially from start to end. Every instruction is perform once only. It used to solve problems that easy. This solution does not involve any condition and there is no repetition of instructions.
  • 13. CONTROL STRUCTURE : in Process 1 Process 2 Process 3 out
  • 14.  Example 1: Kebajikan FTMK mengenakan yuran sebanyak 1% dari jumlah gaji setiap ahli untuk tabung kebajikannya. Lukiskan cartalir dan tuliskan aturcara untuk mencetak nama dan yuran yang diterima dari seorang ahlinya.
  • 15. Anaylze : input : name, salary process : fee = salary * 1% output : fee
  • 17. # include <iostream.h> // Program to calculate and display club fee main () { // Initialization of variables char name [15]; // staff name float salary =0, fee=0; // salary and fee // Data entry section cout << “please enter staff name"; cin >> name; cout << “please enter salary "; cin >> gaji; // Processing section fee = salary *.01; // Printing Section cout << “Staff name “<<name<<endl; cout << "n The club fee is RM"<<fee; // end of programme return 0; }
  • 18. EXAMPLE 2  Assume N number of students have to take MTS1033 course in UPSI and each student is required to buy C++ book with a price of RMX. The publisher will get 10% profit for each book that is sold. Write a program to calculate and print the profit that earned by the publisher.
  • 19. CONTROL STRUCTURE - SELECTION  Selection control structure is used when the execution of instructions are depend on the result of a decision/selection that the program must make if ..else Statement Format : if <(condition)> statement1; else statement2; or if <(condition)> no semicolon statement1; else no semicolon statement2;
  • 20. SELECTION CONTROL STRUCTURE -FLOWCHART condition Statement 2 statement 1 y n If the value of condition is true, then statement1 will be executed, otherwise statement2 will be executed
  • 21. SELECTION CONTROL STRUCTURE -FLOWCHART syarat Kenyataan 1 y t Selection without else statement if <(condition)> or if <(condition)> statement1 { statement1 statement2 : }
  • 22. CONTROL STRUCTURE -SELECTION  Cost of printing price for coloured poster is RM2000 for the first 500 pieces and RM1000 for black and white poster. For each piece above then 500, the cost is RM2 for coloured and RM1.50for the black an white. Write a pseudo code and a programme to calculate payment that need to be paid by a customer.