Algorithm

Topics: Algorithm, Flowchart, Control flow Pages: 2 (371 words) Published: August 2, 2013
Algorithm
is a list of instructions for carrying out some process step by step

Flowchart
is a diagram representing the logical sequence in which a combination of steps or operations is to be performed

Types of Flowcharts

Program Flowchart – describes graphically in detail the logical operations and steps within a program and sequence in which these steps are to be executed for the transformation of data to produce the needed output

System Flowchart – is a graphic representation of the procedures involved in converting data on input media to data in output form

Flowcharting Symbols
[pic]

Basic Control Structure

SEQUENCE – process is executed from one to another in a straight forward manner SELECTION – a choice is provided between two alternatives based on conditions outcome as either TRUE or FALSE ITERATION – or loop, enables certain operations/tasks/instructions to repeat. These tasks are repeated based on conditions outcome as either TRUE or FALSE

Sequence
[pic]
Examples
The length of a rectangle is equal to 5cm and its width is equals to 3cm. Create a flowchart that will display the area and perimeter of the rectangle.

Given three numbers A=3, B=6, C=9, and D=5. Draw a flowchart to compute and print out the sum, average, and product of the given values.

Selection
[pic]

Examples
Create a flowchart for a program that will accept two inputted values. And based on the inputted values the program will display the highest value.

Create a flowchart that will accept two integers X and Y. If X is greater than Y, it will compute for the difference between X and Y. If X is less than Y, it will compute for the product of X and Y. Otherwise, it will compute for the sum of X and Y. Store the results in Z and display the values of X,Y and Z.

Iteration
[pic]
Examples

Draw a flowchart which will read and print out the names and individual scores of 50 students in examination in computer programming.

Create a flowchart that...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • Essay about Algorithm
  • Algorithm Essay
  • Essay about Computers Algorithms
  • PRG211 Algorithms Pseudocode Flowcharts Essay
  • Essay on Fundamentals of Programming with Algorithms and Logic.
  • Essay on Computer Operations, Solving Problem, & Algorithm
  • Digital Analysis and Algorithms Essay
  • Algorithm: Flowchart and Trailer Record Research Paper

Become a StudyMode Member

Sign Up - It's Free