0% found this document useful (0 votes)
86 views28 pages

Flowchart: A Pictorial Form of An Algorithm Is Known As A Flowchart

A flowchart is a pictorial representation of an algorithm that uses graphic symbols to depict the steps of a process or program. It uses standard symbols like rectangles for processes, ovals for start/end points, and arrows to show the flow from one step to the next. Flowcharts allow for visualizing an algorithm and its logic flow in a simple diagrammatic form.

Uploaded by

shahzaib gujjar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views28 pages

Flowchart: A Pictorial Form of An Algorithm Is Known As A Flowchart

A flowchart is a pictorial representation of an algorithm that uses graphic symbols to depict the steps of a process or program. It uses standard symbols like rectangles for processes, ovals for start/end points, and arrows to show the flow from one step to the next. Flowcharts allow for visualizing an algorithm and its logic flow in a simple diagrammatic form.

Uploaded by

shahzaib gujjar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 28

Flowchart

A pictorial form of an algorithm

is known as a

Flowchart.

START/END ------------- START END

INPUT/OUTPUT-------------

PROCESS-------------

FLOW-LINES -------------
Algorithm
A set of finite steps of procedure to solve a problem is known as an Algorithm.
 Write an Algorithm that calculates and prints the sum of given two numbers.
A
1. START
15
2. A = 15 assignment operator

3. B=5 B
4. SUM = A + B
5. DISPLAY “ The sum of two numbers=”, SUM 5
6. END SUM

20

The sum of two numbers=20


START

INPUT “ Enter a number=”, A

INPUT “ Enter another number=”, B

SUM = A + B

DISPLAY “ The sum of two numbers=”, SUM

END
Write an Algorithm that
 input two numbers into two variables.
 Calculates and prints the sum input numbers.

1. START A
2. Input “ Enter a number=” , A
7
3. Input “ Enter another number=” , B B
4. SUM= A + B
18
5. display “ The sum of two numbers=”, SUM SUM
6. END
25

Enter a number=7

Enter another number=18

The sum of two numbers=25


Write an Algorithm that
 input two numbers into two variables.
 Calculates and prints the product input numbers.

1. START A
2. Input “ Enter a number=” , A
10
3. Input “ Enter another number=” , B B
4. P= A * B
14
5. display “ The product of two numbers=”, P P
6. END
140

Enter a number=10

Enter another number=14

The product of two numbers=140


Write an Algorithm that
 input length and width of a rectangle into two variables.
 Calculates and prints the area of rectangle.

1. START
2. Input “ Enter length of a rectangle=” , L
3. Input “ Enter width of a rectangle=” , W
4. AR= L * W
5. display “Area of a rectangle =”, AR
6. END
Write an Algorithm that
 input length and width of a rectangle into two variables.
 Calculates and prints the perimeter of rectangle.

1. START
2. Input “ Enter length of a rectangle=” , L
3. Input “ Enter width of a rectangle=” , W
4. PR= 2 * (L + W )
5. display “Perimeter of a rectangle =”, PR
6. END
Write an Algorithm that Quotient
 input Quotient into a variable.
 input Divisor into another variable. Divisor Dividend
 input Remainder into another variable.
 Calculates and prints the Dividend.

1. START
2. Input “ Enter Quotient=” , Qt Remainder
3. Input “ Enter Divisor=” , Dr
4. Input “ Enter Remainder=” , R 5
5. DD = ( Qt * Dr ) + R
6. Display “ dividend=”,DD
7. END 3 ????????

Suppose Quotient=5, Divisor=3 and Remainder=2

Dividend=?

2
Write an Algorithm that
 input mass of an moving object into a variable.
 input acceleration of that moving object into another variable.
 Calculates and prints the Force using the Newton 2nd Law of Motion.

1. START
2. Input “ Enter mass of a moving object=” , m
3. Input “ Enter acceleration of a moving object =” , a
4. F=m*a
5. Display “ Force = ”,F
6. END
Write an Algorithm that
 input mass of an moving object into a variable.
 input Force with which that object is moving into another variable.
 Calculates and prints the acceleration using the Newton 2nd Law of Motion.

1. START
2. Input “ Enter mass of a moving object=” , m
3. Input “ Enter force of a moving object =” , F
4. a=F/m
5. Display “ Acceleration = ”, a
6. END
Write an Algorithm that
 input acceleration of an moving object into a variable.
 input Force with which that object is moving into another variable.
 Calculates and prints the mass of object using the Newton 2nd Law of Motion.

1. START
2. Input “ Enter acceleration of a moving object=” , a
3. Input “ Enter force of a moving object =” , F
4. m=F/a
5. Display “ Mass = ”, m
6. END

7. START
8. Input “ Enter Quotient=” , Q
9. Input “ Enter Divisor=” , D
10. Input “ Enter Remainder=” , R
11. Dividend = ( Q * D ) + R
12. Display “ dividend=”,Dividend
13. END

Suppose Quotient=5, Divisor=3 and Remainder=2

Dividend=?
Write an Algorithm that
 input Initial velocity of an moving object into a variable.
 input acceleration of that moving object into another variable.
 input time taken by an object to reach its destination into another variable.
 Calculates and prints the Final velocity of the object using
First equation of motion i.e. Vf=Vi + a*t

1. START
2. Input “ Enter initial velocity=” , Vi
3. Input “ Enter acceleration=” , a
4. Input “ Enter time=” , t
5. Vf=Vi + a*t
6. Display “Final velocity=”, Vf
7. END
Write an Algorithm that
 input final velocity of an moving object into a variable.
 input acceleration of that moving object into another variable.
 input time taken by an object to reach its destination into another variable.
 Calculates and prints the initial velocity of the object using
First equation of motion i.e. Vf=Vi + a*t

1. START
2. Input “ Enter Final velocity=” , Vf
3. Input “ Enter acceleration=” , a
4. Input “ Enter time=” , t
5. Vi = Vf - a*t
6. Display “Initial velocity=”, Vi
7. END
Write an Algorithm that
 input final velocity of an moving object into a variable.
 input acceleration of that moving object into another variable.
 input initial velocity an object into another variable.
 Calculates and prints the time taken by object using
First equation of motion i.e. Vf=Vi + a*t

1. START
2. Input “ Enter Final velocity=” , Vf
3. Input “ Enter initial velocity=” , Vi
4. Input “ Enter acceleration=” , a
5. t = (Vf - Vi) / a
6. Display “time=”, t
7. END
Write an Algorithm that
 input final velocity of an moving object into a variable.
 input initial velocity of that moving object into another variable.
 input time taken by an object into another variable.
 Calculates and prints the acceleration of that object using
First equation of motion i.e. Vf=Vi + a*t

1. START
2. Input “ Enter Final velocity=” , Vf
3. Input “ Enter initial velocity=” , Vi
4. Input “ Enter time=” , t
5. a = (Vf - Vi) / t
6. Display “Acceleration=”, a
7. END
Write an Algorithm that
 input Quotient, Dividend, Remainder into three variables.
 Calculates and prints the Divisor.

1. START
2. Input “ Enter Quotient=” , QT
3. Input “ Enter Dividend=” , DD
4. Input “ Enter Remainder=” , R
5. DR=(DD – R ) / QT
6. Display “ divisor=”,DR
7. END

Quotient=5, Dividend=27, Remainder=2 , divisor=? 5


Write an Algorithm that
 input Divisor, Dividend, Remainder into three variables.
 Calculates and prints the Quotient.

1. START
2. Input “ Enter Divisor=” , DR
3. Input “ Enter Dividend=” , DD
4. Input “ Enter Remainder=” , R
5. QT=(DD – R ) / DR
6. Display “ Quotient=”,QT
7. END

Write an Algorithm that


 input Divisor, Dividend, Quotient into three variables.
 Calculates and prints the Remainder.

1. START
2. Input “ Enter Divisor=” , DR
3. Input “ Enter Dividend=” , DD
4. Input “ Enter Quotient=” , QT
5. R=DD - ( QT * DR)
6. Display “ Remainder=”,R
7. END

DR=(DD – R ) / QT

DR* QT =(DD – R )

R =DD-(DR* QT)

R= 27-(5 *5)

R=2
Write an Algorithm that
 input the amount greater than or equals Rs. 600,000/-by the end of the year in a
variable.
 Calculates and prints the Zakat

1. START
2. Input “Enter the amount >= Rs.600,000/- you have by the end of the year =” , A
3. Z= A * 2.5/100
4. display “zakat =”, Z
5. END
1. START
2. Input “Enter kilograms=”,kg
3. g = kg *1000
4. display “ gram =”, g
5. END

1. START
2. Input “Enter grams=”,g
3. kg = g /1000
4. display “kilogram =”, kg
5. END

C=5/9*(F – 32 )
F=9/5*C + 32
Area of a Circle
1. START
2. Input “Enter radius=”,r
3. Pi=3.14
4. AC = Pi * r * r
5. display “ Area of Circle =”, AC
6. END

Circumference of a Circle
1. START
2. Input “Enter radius=”,r
3. Pi=3.14
4. CC = 2 * Pi * r
5. display “ Circumference of Circle =”, CC
6. END
Write an Algorithm that
 input total profit in a variable.
 Input the user share in profit (in percent e.g. 50 or 40) in another variable
 Calculates and prints the profit of the user.

1. START
2. Input “ Total Profit =” , TP
3. Input “ Enter your share=” , Share
4. P= TP * share/100
5. DISPLAY “ Your profit =”, P
6. END
START

INPUT “ Enter a number=”, A

INPUT “ Enter another number=”, B

PRODUCT = A * B

DISPLAY “ The product of two numbers=”, PRODUCT

END
Write an Algorithm that
 input a number in a variable.
 Calculates and prints the square of the input number.

1. START
2. Input “ Enter a number=” , N
3. S= N * N
4. DISPLAY “ The square of the number=”, S
5. END
Write an Algorithm that
 input total profit in a variable.
 Input the profit (in percent e.g. 50 or 40) in another variable
 Calculates and prints the profit of the user.

7. START
8. Input “ Total Profit =” , TP
9. Input “ Enter your share=” , Share
10. P= TP * share/100
11. DISPLAY “ Your profit =”, P
12. END

START

INPUT “ Enter a number=”, N

S= N * N

DISPLAY “ square of the input number=”, S

END
Write an Algorithm that
 input a number in a variable.
 Calculates and prints the cube of the input number.

1. START
2. Input “ Enter a number=” , N
3. Cube= N * N * N
4. DISPLAY “ The cube of the number=”, Cube
5. END

START

INPUT “ Enter a number=”, N

Cube = N * N * N

DISPLAY “ cube of the input number=”, Cube

END
Write an Algorithm that AGE
 input age of the user into a variable2.
18
 Calculates and print the birth year of the user.
YEAR
1. START
2. Input “ Enter your age=” , AGE 2001
3. YEAR= 2019 - AGE
4. DISPLAY “ Birth year=”, YEAR
5. END Birth year=2001

START

INPUT “Enter your age=” , AGE

YEAR= 2019 - AGE

DISPLAY “ Birth year=”, YEAR

END
Write an Algorithm that
 input birth year of the user into a variable.
 Calculates and print the age of the user.

1. START
2. Input “ Enter your birth year=” , BY
3. AGE= 2019 - BY
4. DISPLAY “ your age =”, AGE
5. END

START

Input “ Enter your birth year=” , BY

AGE= 2019 - BY

DISPLAY “ your age =”, AGE

END

You might also like