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

evolution of operating system
evolution of operating systemevolution of operating system
evolution of operating systemAmir Khan
 
What is an algorithm?
What is an algorithm?What is an algorithm?
What is an algorithm?Angela DeHart
 
Algorithm and pseudo codes
Algorithm and pseudo codesAlgorithm and pseudo codes
Algorithm and pseudo codeshermiraguilar
 
Computer Organization and Assembly Language
Computer Organization and Assembly LanguageComputer Organization and Assembly Language
Computer Organization and Assembly Languagefasihuddin90
 
Flowchart and algorithem
Flowchart and algorithemFlowchart and algorithem
Flowchart and algorithemehsanullah786
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchartRabin BK
 
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Gaditek
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm designNahid Hasan
 
1 introduction to problem solving and programming
1 introduction to problem solving and programming1 introduction to problem solving and programming
1 introduction to problem solving and programmingRheigh Henley Calderon
 
Unit1 principle of programming language
Unit1 principle of programming languageUnit1 principle of programming language
Unit1 principle of programming languageVasavi College of Engg
 
Programming languages
Programming languagesProgramming languages
Programming languagesSimon Mui
 
Algorithm and Flowcharts
Algorithm and FlowchartsAlgorithm and Flowcharts
Algorithm and FlowchartsSURBHI SAROHA
 
Chapter 1 - An Introduction to Programming
Chapter 1 - An Introduction to ProgrammingChapter 1 - An Introduction to Programming
Chapter 1 - An Introduction to Programmingmshellman
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and FlowchartsDeva Singh
 
Theory of programming
Theory of programmingTheory of programming
Theory of programmingtcc_joemarie
 

What's hot (20)

evolution of operating system
evolution of operating systemevolution of operating system
evolution of operating system
 
What is an algorithm?
What is an algorithm?What is an algorithm?
What is an algorithm?
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
Algorithm and pseudo codes
Algorithm and pseudo codesAlgorithm and pseudo codes
Algorithm and pseudo codes
 
Computer Organization and Assembly Language
Computer Organization and Assembly LanguageComputer Organization and Assembly Language
Computer Organization and Assembly Language
 
Flowchart and algorithem
Flowchart and algorithemFlowchart and algorithem
Flowchart and algorithem
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)
 
Translators(Compiler, Assembler) and interpreter
Translators(Compiler, Assembler) and interpreterTranslators(Compiler, Assembler) and interpreter
Translators(Compiler, Assembler) and interpreter
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm design
 
1 introduction to problem solving and programming
1 introduction to problem solving and programming1 introduction to problem solving and programming
1 introduction to problem solving and programming
 
Unit1 principle of programming language
Unit1 principle of programming languageUnit1 principle of programming language
Unit1 principle of programming language
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
Von Neumann Architecture
Von Neumann ArchitectureVon Neumann Architecture
Von Neumann Architecture
 
Computer
ComputerComputer
Computer
 
Algorithm and Flowcharts
Algorithm and FlowchartsAlgorithm and Flowcharts
Algorithm and Flowcharts
 
Chapter 1 - An Introduction to Programming
Chapter 1 - An Introduction to ProgrammingChapter 1 - An Introduction to Programming
Chapter 1 - An Introduction to Programming
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and Flowcharts
 
Theory of programming
Theory of programmingTheory of programming
Theory of programming
 

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
 
Algorithm for computational problematic sit
Algorithm for computational problematic sitAlgorithm for computational problematic sit
Algorithm for computational problematic sitSaurabh846965
 

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)
 
Algorithm for computational problematic sit
Algorithm for computational problematic sitAlgorithm for computational problematic sit
Algorithm for computational problematic sit
 

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

Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 

Recently uploaded (20)

Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 

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; }