Beruflich Dokumente
Kultur Dokumente
Algorithms and flowcharts are two tools a software developer uses when
creating new programs. An algorithm is a step-by-step recipe for processing
data. For example it could be a process an online store uses to calculate
discounts. A flowchart graphically represents the steps a program or set of
programs takes to process data. Though flowcharts are technically-oriented,
non-technical users can easily follow them, making them useful documents for
project management and auditing.
Algorithms
Algorithm:
Step1: Start
Step2: Read\input the first num1.
Step3: Read\input the second num2.
Step4: Sum num1+num2 // calculation of sum
Step5: Print Sum
Step6: End
Flowchart
The flowchart is a diagram which visually presents the flow of data through
processing systems. A flow chart is a blueprint of a design that shows the
operations performed and the sequence of these operations in a system.
Features of Flowchart:
Refer to book
Flowchart Symbols
There are 5 basic symbols commonly used in flowcharting of assembly
language Programs: Terminal, Process, input/output, Decision and arrows.
Algorithm for 8a
Step 1: Start
Flow Chart :
START
Read the
Price of
Pencil P
Read the
Price of a
Eraser E and
no. of
Erasers nE
Total Amount
TA = P + nE x E +
nR x R + nC x C
Display
Total
Amount
STOP
Algorithm 8b
Step1: Start
Step 2: Read the no of packets N & no. of Chocolates in each Packet C
Step 3: Read the no of Students S
Step 3: Calculate the no of Chocolates each Student gets nC = ( N X C ) / S
Step 6: Display the no of Chocolates each classmate would get nC
Step 7: Stop
Flow Chart :
START
Read the no
of packets N
& no. of
Chocolates in
each Packet
C
Read the no
of Students S
No. of Chocolates
nC = ( N X C ) / S
Display no
of
chocolates
nC
STOP