SlideShare a Scribd company logo
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.

More Related Content

What's hot

Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
rajnidhiman
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
Emmanuel Alimpolos
 
Flow chart
Flow chartFlow chart
Flow chart
Sapna Sharma
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowcharts
Samuel Igbanogu
 
Flowchart and algorithem
Flowchart and algorithemFlowchart and algorithem
Flowchart and algorithem
ehsanullah786
 
Flowchart and algorithm
Flowchart and algorithmFlowchart and algorithm
Flowchart and algorithm
DHANIK VIKRANT
 
Flowchart and algorithm
Flowchart and algorithmFlowchart and algorithm
Flowchart and algorithm
Sayali Shivarkar
 
Computer programming:Know How to Flowchart
Computer  programming:Know How to FlowchartComputer  programming:Know How to Flowchart
Computer programming:Know How to Flowchart
Angelo Tomboc
 
Pseudocode algorithim flowchart
Pseudocode algorithim flowchartPseudocode algorithim flowchart
Pseudocode algorithim flowchart
fika sweety
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
luhkahreth
 
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 flowcharts
khair20
 
Unit 3 Foc
Unit  3 FocUnit  3 Foc
Unit 3 Foc
JAYA
 
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
Algorithmsandflowcharts2
Darlene Interno
 
Introduction to flowchart
Introduction to flowchartIntroduction to flowchart
Introduction to flowchart
Jordan Delacruz
 
Algorithms and flowcharts1
Algorithms and flowcharts1Algorithms and flowcharts1
Algorithms and flowcharts1
Lincoln School
 
1153 algorithms%20and%20flowcharts
1153 algorithms%20and%20flowcharts1153 algorithms%20and%20flowcharts
1153 algorithms%20and%20flowcharts
Dani Garnida
 
3 algorithm-and-flowchart
3 algorithm-and-flowchart3 algorithm-and-flowchart
3 algorithm-and-flowchart
Rohit Shrivastava
 
Flow chart programming
Flow chart programmingFlow chart programming
Flow chart programming
Tearsome Llantada
 

What's hot (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
 

Similar to Penyelesaian masalah

Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
Sachin Goyani
 
UNIT 1.pptx
UNIT 1.pptxUNIT 1.pptx
UNIT 1.pptx
ShaswatSurya
 
Lect 3-4 Zaheer Abbas
Lect 3-4 Zaheer AbbasLect 3-4 Zaheer Abbas
Lect 3-4 Zaheer Abbas
Information Technology Center
 
Software develop....
Software develop.... Software develop....
Software develop....
GCWUS
 
PDLC.pptx
PDLC.pptxPDLC.pptx
PDLC.pptx
marysj3
 
What is algorithm
What is algorithmWhat is algorithm
What is algorithm
mshoaib15
 
Pseudo code.pptx
Pseudo code.pptxPseudo code.pptx
Pseudo code.pptx
Chaya64047
 
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
Frankie Jones
 
Introduction to Problem Solving Techniques- Python
Introduction to Problem Solving Techniques- PythonIntroduction to Problem Solving Techniques- Python
Introduction to Problem Solving Techniques- Python
PriyankaC44
 
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.pptLecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
ReshuReshma8
 
Algorithm and flowchart.pptx
Algorithm and flowchart.pptxAlgorithm and flowchart.pptx
Algorithm and flowchart.pptx
MaheShiva
 
Basic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and FlowchartsBasic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and Flowcharts
moazwinner
 
Pengenalan kepada pengaturcaraan berstruktur
Pengenalan kepada pengaturcaraan berstrukturPengenalan kepada pengaturcaraan berstruktur
Pengenalan kepada pengaturcaraan berstruktur
Unit Kediaman Luar Kampus
 
Ch1 principles of software development
Ch1 principles of software developmentCh1 principles of software development
Ch1 principles of software development
Hattori Sidek
 
c_algo_flowchart.pdf
c_algo_flowchart.pdfc_algo_flowchart.pdf
c_algo_flowchart.pdf
simmis5
 
Fundamentals of Programming Lecture #1.pptx
Fundamentals of Programming Lecture #1.pptxFundamentals of Programming Lecture #1.pptx
Fundamentals of Programming Lecture #1.pptx
Eyasu46
 
Fundamentals of Programming Chapter 3
Fundamentals of Programming Chapter 3Fundamentals of Programming Chapter 3
Fundamentals of Programming Chapter 3
Mohd Harris Ahmad Jaal
 
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
ishan743441
 
Algorithm manual
Algorithm manualAlgorithm manual
Algorithm manual
EfendyMasuli
 
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
Alicia Edwards
 

Similar to Penyelesaian masalah (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 manual
Algorithm manualAlgorithm manual
Algorithm manual
 
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
 

More from Unit Kediaman Luar Kampus

Fungsi (i)
Fungsi (i)Fungsi (i)
Fail
FailFail
Fungsi (ii)
Fungsi (ii)Fungsi (ii)
Basic pengaturcaraan
Basic pengaturcaraanBasic pengaturcaraan
Basic pengaturcaraan
Unit Kediaman Luar Kampus
 
Latihan 2
Latihan 2Latihan 2
Pengaturcaraan asas
Pengaturcaraan asasPengaturcaraan asas
Pengaturcaraan asas
Unit Kediaman Luar Kampus
 
Looping
LoopingLooping

More from 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
 

Recently uploaded

Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
saastr
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Jeffrey Haguewood
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
GDSC PJATK
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 

Recently uploaded (20)

Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 

Penyelesaian masalah

  • 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.