2 Problem Solving Technique
2 Problem Solving Technique
Problem
Solving
Technique
Using Computer
2
Course Instructor:
Md. Shadmim Hasan Sifat
Lecturer, CSE, SUST
3
What is it ?
“Problem Solving” in the context of programming
involves a
structured approach to
✓ Identify
✓Analyze
✓Solve
problems…
Problem Solving Using Computer 4
Steps
1) Problem Analysis
2) Design
3) Coding
4) Compilation & Execution
5) Debugging & Testing
6) Documentation
Problem Analysis
a) Objectives
b) Output Requirements
c) Input Requirements
d) Processing Requirements
e) Evaluating Feasibility
area of circle.
Steps Other Problems:
Step1: Start 1. Write an algorithm to calculate
simple interest. (SI = PTR/100)
Step2: Define constant variable PI
which holds value 3.1415 2. Write an algorithm to determine
a number whether it is positive or
Step3: Define variables: radius, area negative.
Step4: Read radius 3. Write an algorithm to test a
number for even or odd.
Step5: Calculate Area of Circle:
4. Write an algorithm to find the
area = PI * radius * radius largest among three numbers.
Step6: Display area of circle 5. Write an algorithm for finding the
Step7: Stop sum of series 1+2+3+4+… up to n
terms
Flowchart to calculate area of circle:
Read: radius
Display Area
Program
Compilation Linking Loading Execution
Code
Error Category
Syntax Error
Semantic Error
Runtime Error
Memory Overflow
Floating Point Error
Program Documentation 15
Thank You!
Feel free to ask any question !!!