You are on page 1of 6

DEPARTMENT OF COMPUTER SCIENCE

AND ENGINEERING
SUBMITTED TO : SUBMITTED BY :

Md. Khaliluzzaman Jakia Rahman


Assistant Professor Department of CSE
Department of CSE 1st Semester
International Islamic ID : C-201234
University of Chittagong. Course code : CSE-1122
Date : 15.04.2020
ASSIGNMENT ON : ALGORITHM AND FLOW CHART TO SHOW THE ASCENDING ORDER OF
THREE NUMBERS.

Assalamu alaikum . Today I am assigned to submit an assignment to show the ascending


order of three numbers with an algorithm and flowchart.First of all, we need to know about
algorithm and flowchart.

INTRODUCTION :
Algorithms and flowcharts are two different procedure used for creating new programs,
especially in computer programming. An algorithm is a step-by-step analysis of the process
and a flowchart explains the steps of a program in a graphical way.
DEFINATION OF ALGORITHM :
A programming algorithm is a computer procedure to tell the computer precisely what steps
to take to complete a program or to reach a goal.
DEFINATION OF FLOWCHART :
A programming flowchart is a diagram with a set of standard symbols to visualize the
algorithm.
ALGORITHM

STEP 1 : Start .
STEP 2 : Input three numbers(A,B,C) from the user
STEP 3 : If A>B then go to step 4, otherwise go to step 2 .
STEP 4 : If A>C then go to step 5, otherwise go to step 7 .
STEP 5 : If C>B then go to step 9, otherwise go to step 6 .
STEP 6 : Interchange B and C , then go to step 9 .
STEP 7 : Interchange A and C , then go to step 3 .
STEP 8 : Interchange A and B , then go to step 3 .
STEP 9 : Print ascending order of the numbers .
STEP 10 : Stop .
Start

FLOWCHART :
Input
A,B,C

True False
A>B

False True
True False
A>C B>C
True
True False False
B>C C>A>B C>B>A C>A

A>C>B A>B>C B>C>A B>A>C


Print
ascending
order

stop
THANK YOU

You might also like