Algorithm and Flow Chart
Algorithm and Flow Chart
3
.Algorithms Cont
A well-defined computational procedure that
takes some value, or set of values, as input and
produces some value, or set of values, as output.
4
Correct and incorrect algorithms
Algorithm is correct if, for every input instance, it ends
with the correct output. We say that a correct algorithm
solves the given computational problem.
5
Problems and Algorithms
We need to solve a computational problem
“Convert a weight in pounds to Kg”
6
The Problem-solving Process
Analysis
Problem
specification
Design
Algorithm
Implementation
Program
Compilation
Executable
(solution)
7
From Algorithms to Programs
Problem
Algorithm:
Algorithm A sequence
of instructions describing
how to do a task (or
process)
C Program
8
The End