SlideShare a Scribd company logo
1 of 16
Problem solving usingProblem solving using
ComputersComputers
By :
David Livingston J
Sudesh Kantila
Need for Programming LanguageNeed for Programming Language
1. We have some problem.
2. We have to solve the problem.
3. We can solve the problem, but we don’t
want to repeatedly solve the similar
problems.
4. We want to use the computer to do this
task for us whenever required.
5. We have to tell the computer, “How to
solve the problem.”
What is Problem?What is Problem?
 A problem is an obstacle which makes it
difficult to achieve a desired goal, objective
or purpose.
 It refers to a situation, condition, or issue
that is yet unresolved.
 In a broad sense, a problem exists when
an individual becomes aware of a
significant difference between what
actually is and what is desired.
What is Problem Solving?What is Problem Solving?
Every problem in the real world needs to
be identified and solved. Trying to find a
solution to a problem is known as
problem solving.
Problem solving becomes a part of our
day to day activity. Especially, when we
use computers for performing our day to
day activity.
How to solve a problem?How to solve a problem?
1. If you have a problem, either you can solve it
manually or using computer.
2. If the problem is easy enough, solve it
manually or else use computers.
3. Bigger problems can be sub-divided into
smaller problems (sub-problems) and start
solving them one by one.
4. After completing solving sub-problems, the
entire big problem has been solved easily.
Algorithm – Logic to solveAlgorithm – Logic to solve
If you have solved any problem already,
you would have definitely used some
procedure (logic) to do so.
There may be many different logic that can
solve a single problem.
You may write this logic into small steps
(easy enough) in english (or whatever
language you understand).
This block of steps to solve the problem is
called an “Algorithm”.
A simple problem - FactorialA simple problem - Factorial
We have to calculate the factorial of a
number ‘N’.
We know how to calculate the factorial.
Logic 1:
N! = N * N-1 * N-2 * …* N-(N-1) {N-(N-1)=1}
Logic 2:
N! = 1 * 2 * 3 * … * N
Logic 3:
N! = N * (N-1)! (Recursion)
Logic 1: (Algorithm)Logic 1: (Algorithm)
1. START
2. INPUT AN INTEGER – N
3. LET F=1
4. IF N > 1 GOTO STEP 5 ELSE STEP 8
5. F = F * N
6. N = N – 1
7. GOTO STEP 4
8. OUTPUT F
9. STOP
Logic 2: (Algorithm)Logic 2: (Algorithm)
1. START
2. INPUT AN INTEGER – N
3. LET F=1, X=1
4. IF X < N GOTO STEP 5 ELSE STEP 8
5. X = X + 1
6. F = F * X
7. GOTO STEP 4
8. OUTPUT F
9. STOP
Flow Chart – Graphical AlgorithmFlow Chart – Graphical Algorithm
Algorithms are written in some natural
language, e.g. – English, िहिन्दी, Chinease etc.
There may be some problem to understand
the algorithm if a person from different
region speaking a different language needs to
know the logic.
To overcome this problem, logic may be
represented in a graphical way.
This graphical representation of algorithm is
called ‘Flow Chart’
Flow Chart – Logic 1Flow Chart – Logic 1
LET F=1
IF
N > 1
INPUT N
START
OUTPUT F
START
F = F * N
N = N - 1
Yes
No
Flow Chart – Logic 2Flow Chart – Logic 2
LET F=1
X = 1
IF
X < N
INPUT N
START
OUTPUT F
START
X = X + 1
F = F * X
No
Yes
Common Flow Chart ShapesCommon Flow Chart Shapes
Flow Lines
Terminator
Input / Output Box
Process
Decision Box
(On Page and Off Page) Connectors
Predefined Process
PseudocodePseudocode
Pseudocode is a kind of structured english for
describing algorithms.
It allows the designer to focus on the logic of the
algorithm without being distracted by details of
language syntax. 
At the same time, the pseudocode needs to be
complete. It describe the entire logic of the
algorithm so that implementation becomes a rote
mechanical task of translating line by line into
source code (coding).
Pseudocode cannot be compiled nor executed, and
there are no real formatting or syntax rules.
Pseudocode – Logic 1Pseudocode – Logic 1
GET value of N
SET initial value of F to 1
WHILE N > 1
F = F * N
N = N – 1
ENDWHILE
DISPLAY value of F
Programming (Coding) in CProgramming (Coding) in C
main()
{
int n;
long f=1;
printf(“Input n to get factorial: ”);
scanf(“%i”,&n);
while (n > 1)
{
f = f * n;
n = n – 1;
}
printf(“Factorial of %i is %li”,n,f);
retrun 0;
}

More Related Content

What's hot

Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm designNahid Hasan
 
Chapter #1 overview of programming and problem solving
Chapter #1 overview of programming and problem solvingChapter #1 overview of programming and problem solving
Chapter #1 overview of programming and problem solvingAbdul Shah
 
Programming paradigm
Programming paradigmProgramming paradigm
Programming paradigmbusyking03
 
Programming Fundamentals lecture 1
Programming Fundamentals lecture 1Programming Fundamentals lecture 1
Programming Fundamentals lecture 1REHAN IJAZ
 
Problem Solving and Python Programming
Problem Solving and Python ProgrammingProblem Solving and Python Programming
Problem Solving and Python ProgrammingMahaJeya
 
Algorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsAlgorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsMohamed Loey
 
Algorithm and Programming (Introduction of Algorithms)
Algorithm and Programming (Introduction of Algorithms)Algorithm and Programming (Introduction of Algorithms)
Algorithm and Programming (Introduction of Algorithms)Adam Mukharil Bachtiar
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and FlowchartsDeva Singh
 
Introduction to Software Engineering
Introduction to Software EngineeringIntroduction to Software Engineering
Introduction to Software EngineeringSaqib Raza
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & LanguagesGaditek
 
Programming Fundamental Presentation
Programming Fundamental PresentationProgramming Fundamental Presentation
Programming Fundamental Presentationfazli khaliq
 
What is an algorithm?
What is an algorithm?What is an algorithm?
What is an algorithm?Angela DeHart
 
Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.Md Hossen
 
Programming languages
Programming languagesProgramming languages
Programming languagesAkash Varaiya
 
Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer   Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer Ashim Lamichhane
 

What's hot (20)

Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm design
 
Programming Fundamentals
Programming FundamentalsProgramming Fundamentals
Programming Fundamentals
 
Chapter #1 overview of programming and problem solving
Chapter #1 overview of programming and problem solvingChapter #1 overview of programming and problem solving
Chapter #1 overview of programming and problem solving
 
Programming paradigm
Programming paradigmProgramming paradigm
Programming paradigm
 
Programming Fundamentals lecture 1
Programming Fundamentals lecture 1Programming Fundamentals lecture 1
Programming Fundamentals lecture 1
 
Introduction to Coding
Introduction to CodingIntroduction to Coding
Introduction to Coding
 
Problem Solving and Python Programming
Problem Solving and Python ProgrammingProblem Solving and Python Programming
Problem Solving and Python Programming
 
Algorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsAlgorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to Algorithms
 
Algorithm and Programming (Introduction of Algorithms)
Algorithm and Programming (Introduction of Algorithms)Algorithm and Programming (Introduction of Algorithms)
Algorithm and Programming (Introduction of Algorithms)
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and Flowcharts
 
Computer Languages.
Computer Languages.Computer Languages.
Computer Languages.
 
Introduction to Software Engineering
Introduction to Software EngineeringIntroduction to Software Engineering
Introduction to Software Engineering
 
Introduction to computing
Introduction to computingIntroduction to computing
Introduction to computing
 
Daa unit 1
Daa unit 1Daa unit 1
Daa unit 1
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
 
Programming Fundamental Presentation
Programming Fundamental PresentationProgramming Fundamental Presentation
Programming Fundamental Presentation
 
What is an algorithm?
What is an algorithm?What is an algorithm?
What is an algorithm?
 
Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer   Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer
 

Viewers also liked

Data structures & problem solving unit 1 ppt
Data structures & problem solving unit 1 pptData structures & problem solving unit 1 ppt
Data structures & problem solving unit 1 pptaviban
 
Power Point Lesson 06
Power Point Lesson 06Power Point Lesson 06
Power Point Lesson 06Nasir Jumani
 
Problems, Opportunities and Decisions
Problems, Opportunities and DecisionsProblems, Opportunities and Decisions
Problems, Opportunities and DecisionsSounay Phothisane
 
Sigma Knowledge Engineering Environment
Sigma Knowledge Engineering EnvironmentSigma Knowledge Engineering Environment
Sigma Knowledge Engineering EnvironmentKingsley Uyi Idehen
 
Introduction to Object Oriented Design
Introduction to Object Oriented DesignIntroduction to Object Oriented Design
Introduction to Object Oriented DesignOleg Yaroshevych
 
Object Oriented Design And Programing
Object Oriented Design And ProgramingObject Oriented Design And Programing
Object Oriented Design And ProgramingEmmanuel Fuchs
 
3.o o design -_____________lecture 3
3.o o design -_____________lecture 33.o o design -_____________lecture 3
3.o o design -_____________lecture 3Warui Maina
 
Out of the box thinking
Out of the box thinkingOut of the box thinking
Out of the box thinkingSameer Mathur
 
Problem solving section 1
Problem solving section 1Problem solving section 1
Problem solving section 1dwyer1an
 
Solving a “Transportation Planning” Problem through the Programming Language “C”
Solving a “Transportation Planning” Problem through the Programming Language “C”Solving a “Transportation Planning” Problem through the Programming Language “C”
Solving a “Transportation Planning” Problem through the Programming Language “C”Shahadat Hossain Shakil
 
Mypresentation
MypresentationMypresentation
MypresentationSukh14
 
Structured systems analysis and design methodology
Structured systems analysis and design methodologyStructured systems analysis and design methodology
Structured systems analysis and design methodologyVatsana Technologies Pte Ltd
 
FINITE STATE MACHINE AND CHOMSKY HIERARCHY
FINITE STATE MACHINE AND CHOMSKY HIERARCHYFINITE STATE MACHINE AND CHOMSKY HIERARCHY
FINITE STATE MACHINE AND CHOMSKY HIERARCHYnishimanglani
 
Visualization of Hajime Yoshino’s Logical Jurisprudence. IRIS 2017
Visualization of Hajime Yoshino’s Logical Jurisprudence. IRIS 2017Visualization of Hajime Yoshino’s Logical Jurisprudence. IRIS 2017
Visualization of Hajime Yoshino’s Logical Jurisprudence. IRIS 2017Vytautas Čyras
 
Machine Learning for Automated Reasoning: An Overview
Machine Learning for Automated Reasoning: An OverviewMachine Learning for Automated Reasoning: An Overview
Machine Learning for Automated Reasoning: An OverviewVincenzo Lomonaco
 

Viewers also liked (20)

Data structures & problem solving unit 1 ppt
Data structures & problem solving unit 1 pptData structures & problem solving unit 1 ppt
Data structures & problem solving unit 1 ppt
 
Power Point Lesson 06
Power Point Lesson 06Power Point Lesson 06
Power Point Lesson 06
 
Chapter 02 - Problem Solving
Chapter 02 - Problem SolvingChapter 02 - Problem Solving
Chapter 02 - Problem Solving
 
Problems, Opportunities and Decisions
Problems, Opportunities and DecisionsProblems, Opportunities and Decisions
Problems, Opportunities and Decisions
 
Sigma Knowledge Engineering Environment
Sigma Knowledge Engineering EnvironmentSigma Knowledge Engineering Environment
Sigma Knowledge Engineering Environment
 
Introduction to Object Oriented Design
Introduction to Object Oriented DesignIntroduction to Object Oriented Design
Introduction to Object Oriented Design
 
Slide 3 musfique
Slide 3 musfiqueSlide 3 musfique
Slide 3 musfique
 
Object Oriented Design And Programing
Object Oriented Design And ProgramingObject Oriented Design And Programing
Object Oriented Design And Programing
 
Unit 2. Elements of C
Unit 2. Elements of CUnit 2. Elements of C
Unit 2. Elements of C
 
Thinking and language
Thinking and languageThinking and language
Thinking and language
 
3.o o design -_____________lecture 3
3.o o design -_____________lecture 33.o o design -_____________lecture 3
3.o o design -_____________lecture 3
 
Out of the box thinking
Out of the box thinkingOut of the box thinking
Out of the box thinking
 
Problem solving section 1
Problem solving section 1Problem solving section 1
Problem solving section 1
 
Solving a “Transportation Planning” Problem through the Programming Language “C”
Solving a “Transportation Planning” Problem through the Programming Language “C”Solving a “Transportation Planning” Problem through the Programming Language “C”
Solving a “Transportation Planning” Problem through the Programming Language “C”
 
Mypresentation
MypresentationMypresentation
Mypresentation
 
4 Solving problem
4 Solving problem4 Solving problem
4 Solving problem
 
Structured systems analysis and design methodology
Structured systems analysis and design methodologyStructured systems analysis and design methodology
Structured systems analysis and design methodology
 
FINITE STATE MACHINE AND CHOMSKY HIERARCHY
FINITE STATE MACHINE AND CHOMSKY HIERARCHYFINITE STATE MACHINE AND CHOMSKY HIERARCHY
FINITE STATE MACHINE AND CHOMSKY HIERARCHY
 
Visualization of Hajime Yoshino’s Logical Jurisprudence. IRIS 2017
Visualization of Hajime Yoshino’s Logical Jurisprudence. IRIS 2017Visualization of Hajime Yoshino’s Logical Jurisprudence. IRIS 2017
Visualization of Hajime Yoshino’s Logical Jurisprudence. IRIS 2017
 
Machine Learning for Automated Reasoning: An Overview
Machine Learning for Automated Reasoning: An OverviewMachine Learning for Automated Reasoning: An Overview
Machine Learning for Automated Reasoning: An Overview
 

Similar to Problem solving using Computer

Introduction to Programming
Introduction to ProgrammingIntroduction to Programming
Introduction to ProgrammingALI RAZA
 
C programming .pptx
C programming .pptxC programming .pptx
C programming .pptxSuhaibKhan62
 
Computer Programming Computer Programming
Computer Programming Computer ProgrammingComputer Programming Computer Programming
Computer Programming Computer Programmingarifhasan88
 
Small Basic Calculator Apps lesson
Small Basic Calculator Apps lessonSmall Basic Calculator Apps lesson
Small Basic Calculator Apps lessonEdujetage
 
Algorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo codeAlgorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo codehamza javed
 
Learning and Modern Programming Languages
Learning and Modern Programming LanguagesLearning and Modern Programming Languages
Learning and Modern Programming LanguagesRay Toal
 
Basics of Programming - A Review Guide
Basics of Programming - A Review GuideBasics of Programming - A Review Guide
Basics of Programming - A Review GuideBenjamin Kissinger
 
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
 
Std 10 computer chapter 9 Problems and Problem Solving
Std 10 computer chapter 9 Problems and Problem SolvingStd 10 computer chapter 9 Problems and Problem Solving
Std 10 computer chapter 9 Problems and Problem SolvingNuzhat Memon
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer ProgrammingProf. Erwin Globio
 
Programming Fundamentals using C++
Programming Fundamentals using C++Programming Fundamentals using C++
Programming Fundamentals using C++ALI RAZA
 
Chapter 2(1)
Chapter 2(1)Chapter 2(1)
Chapter 2(1)TejaswiB4
 
Flowchart and algorithem
Flowchart and algorithemFlowchart and algorithem
Flowchart and algorithemehsanullah786
 

Similar to Problem solving using Computer (20)

Learn C
Learn CLearn C
Learn C
 
Introduction to Programming
Introduction to ProgrammingIntroduction to Programming
Introduction to Programming
 
C programming .pptx
C programming .pptxC programming .pptx
C programming .pptx
 
CC-112-Lec.1.ppsx
CC-112-Lec.1.ppsxCC-112-Lec.1.ppsx
CC-112-Lec.1.ppsx
 
Computer Programming Computer Programming
Computer Programming Computer ProgrammingComputer Programming Computer Programming
Computer Programming Computer Programming
 
Small Basic Calculator Apps lesson
Small Basic Calculator Apps lessonSmall Basic Calculator Apps lesson
Small Basic Calculator Apps lesson
 
Algorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo codeAlgorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo code
 
Learning and Modern Programming Languages
Learning and Modern Programming LanguagesLearning and Modern Programming Languages
Learning and Modern Programming Languages
 
01 Programming Fundamentals.pptx
01 Programming Fundamentals.pptx01 Programming Fundamentals.pptx
01 Programming Fundamentals.pptx
 
Problem solving methodology
Problem solving methodologyProblem solving methodology
Problem solving methodology
 
Algorithms overview
Algorithms overviewAlgorithms overview
Algorithms overview
 
Basics of Programming - A Review Guide
Basics of Programming - A Review GuideBasics of Programming - A Review Guide
Basics of Programming - A Review Guide
 
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
 
Std 10 computer chapter 9 Problems and Problem Solving
Std 10 computer chapter 9 Problems and Problem SolvingStd 10 computer chapter 9 Problems and Problem Solving
Std 10 computer chapter 9 Problems and Problem Solving
 
Algorithm.pdf
Algorithm.pdfAlgorithm.pdf
Algorithm.pdf
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer Programming
 
Programming Fundamentals using C++
Programming Fundamentals using C++Programming Fundamentals using C++
Programming Fundamentals using C++
 
Introduction.pptx
Introduction.pptxIntroduction.pptx
Introduction.pptx
 
Chapter 2(1)
Chapter 2(1)Chapter 2(1)
Chapter 2(1)
 
Flowchart and algorithem
Flowchart and algorithemFlowchart and algorithem
Flowchart and algorithem
 

More from David Livingston J

Performing Addition and Subtraction on Integers
Performing Addition and Subtraction on IntegersPerforming Addition and Subtraction on Integers
Performing Addition and Subtraction on IntegersDavid Livingston J
 
Introduction to Bluetooth technology
Introduction to Bluetooth technologyIntroduction to Bluetooth technology
Introduction to Bluetooth technologyDavid Livingston J
 
Past, Present and Future of Mobile Computing
Past, Present and Future of Mobile ComputingPast, Present and Future of Mobile Computing
Past, Present and Future of Mobile ComputingDavid Livingston J
 
Introduction & history of mobile computing
Introduction & history of mobile computingIntroduction & history of mobile computing
Introduction & history of mobile computingDavid Livingston J
 
Frequently asked questions in c
Frequently asked questions in cFrequently asked questions in c
Frequently asked questions in cDavid Livingston J
 
Frequently asked questions in c
Frequently asked questions in cFrequently asked questions in c
Frequently asked questions in cDavid Livingston J
 

More from David Livingston J (9)

Performing Addition and Subtraction on Integers
Performing Addition and Subtraction on IntegersPerforming Addition and Subtraction on Integers
Performing Addition and Subtraction on Integers
 
Introduction to Bluetooth technology
Introduction to Bluetooth technologyIntroduction to Bluetooth technology
Introduction to Bluetooth technology
 
Wireless LAN Technoloy
Wireless LAN TechnoloyWireless LAN Technoloy
Wireless LAN Technoloy
 
Past, Present and Future of Mobile Computing
Past, Present and Future of Mobile ComputingPast, Present and Future of Mobile Computing
Past, Present and Future of Mobile Computing
 
Introduction & history of mobile computing
Introduction & history of mobile computingIntroduction & history of mobile computing
Introduction & history of mobile computing
 
Frequently asked questions in c
Frequently asked questions in cFrequently asked questions in c
Frequently asked questions in c
 
Frequently asked questions in c
Frequently asked questions in cFrequently asked questions in c
Frequently asked questions in c
 
File handling in c
File handling in cFile handling in c
File handling in c
 
Structure of a C program
Structure of a C programStructure of a C program
Structure of a C program
 

Recently uploaded

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 

Recently uploaded (20)

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 

Problem solving using Computer

  • 1. Problem solving usingProblem solving using ComputersComputers By : David Livingston J Sudesh Kantila
  • 2. Need for Programming LanguageNeed for Programming Language 1. We have some problem. 2. We have to solve the problem. 3. We can solve the problem, but we don’t want to repeatedly solve the similar problems. 4. We want to use the computer to do this task for us whenever required. 5. We have to tell the computer, “How to solve the problem.”
  • 3. What is Problem?What is Problem?  A problem is an obstacle which makes it difficult to achieve a desired goal, objective or purpose.  It refers to a situation, condition, or issue that is yet unresolved.  In a broad sense, a problem exists when an individual becomes aware of a significant difference between what actually is and what is desired.
  • 4. What is Problem Solving?What is Problem Solving? Every problem in the real world needs to be identified and solved. Trying to find a solution to a problem is known as problem solving. Problem solving becomes a part of our day to day activity. Especially, when we use computers for performing our day to day activity.
  • 5. How to solve a problem?How to solve a problem? 1. If you have a problem, either you can solve it manually or using computer. 2. If the problem is easy enough, solve it manually or else use computers. 3. Bigger problems can be sub-divided into smaller problems (sub-problems) and start solving them one by one. 4. After completing solving sub-problems, the entire big problem has been solved easily.
  • 6. Algorithm – Logic to solveAlgorithm – Logic to solve If you have solved any problem already, you would have definitely used some procedure (logic) to do so. There may be many different logic that can solve a single problem. You may write this logic into small steps (easy enough) in english (or whatever language you understand). This block of steps to solve the problem is called an “Algorithm”.
  • 7. A simple problem - FactorialA simple problem - Factorial We have to calculate the factorial of a number ‘N’. We know how to calculate the factorial. Logic 1: N! = N * N-1 * N-2 * …* N-(N-1) {N-(N-1)=1} Logic 2: N! = 1 * 2 * 3 * … * N Logic 3: N! = N * (N-1)! (Recursion)
  • 8. Logic 1: (Algorithm)Logic 1: (Algorithm) 1. START 2. INPUT AN INTEGER – N 3. LET F=1 4. IF N > 1 GOTO STEP 5 ELSE STEP 8 5. F = F * N 6. N = N – 1 7. GOTO STEP 4 8. OUTPUT F 9. STOP
  • 9. Logic 2: (Algorithm)Logic 2: (Algorithm) 1. START 2. INPUT AN INTEGER – N 3. LET F=1, X=1 4. IF X < N GOTO STEP 5 ELSE STEP 8 5. X = X + 1 6. F = F * X 7. GOTO STEP 4 8. OUTPUT F 9. STOP
  • 10. Flow Chart – Graphical AlgorithmFlow Chart – Graphical Algorithm Algorithms are written in some natural language, e.g. – English, िहिन्दी, Chinease etc. There may be some problem to understand the algorithm if a person from different region speaking a different language needs to know the logic. To overcome this problem, logic may be represented in a graphical way. This graphical representation of algorithm is called ‘Flow Chart’
  • 11. Flow Chart – Logic 1Flow Chart – Logic 1 LET F=1 IF N > 1 INPUT N START OUTPUT F START F = F * N N = N - 1 Yes No
  • 12. Flow Chart – Logic 2Flow Chart – Logic 2 LET F=1 X = 1 IF X < N INPUT N START OUTPUT F START X = X + 1 F = F * X No Yes
  • 13. Common Flow Chart ShapesCommon Flow Chart Shapes Flow Lines Terminator Input / Output Box Process Decision Box (On Page and Off Page) Connectors Predefined Process
  • 14. PseudocodePseudocode Pseudocode is a kind of structured english for describing algorithms. It allows the designer to focus on the logic of the algorithm without being distracted by details of language syntax.  At the same time, the pseudocode needs to be complete. It describe the entire logic of the algorithm so that implementation becomes a rote mechanical task of translating line by line into source code (coding). Pseudocode cannot be compiled nor executed, and there are no real formatting or syntax rules.
  • 15. Pseudocode – Logic 1Pseudocode – Logic 1 GET value of N SET initial value of F to 1 WHILE N > 1 F = F * N N = N – 1 ENDWHILE DISPLAY value of F
  • 16. Programming (Coding) in CProgramming (Coding) in C main() { int n; long f=1; printf(“Input n to get factorial: ”); scanf(“%i”,&n); while (n > 1) { f = f * n; n = n – 1; } printf(“Factorial of %i is %li”,n,f); retrun 0; }