0% found this document useful (0 votes)
40 views10 pages

Print C: Name:Abid Jan Section: CB ROLL NO: 13221 Course Title: Intro To Computer Programming COURSE ID: CS106

The document contains algorithms and flowcharts for several math and temperature conversion problems: 1) It includes algorithms and flowcharts for adding two numbers (a+b) and squaring their sum ((a+b)^2). 2) There are algorithms and a flowchart for calculating the average of 5 user-input numbers. 3) An algorithm and flowchart show converting Celsius to Fahrenheit using the formula F=(1.8*C)+32.

Uploaded by

Abid jan
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)
40 views10 pages

Print C: Name:Abid Jan Section: CB ROLL NO: 13221 Course Title: Intro To Computer Programming COURSE ID: CS106

The document contains algorithms and flowcharts for several math and temperature conversion problems: 1) It includes algorithms and flowcharts for adding two numbers (a+b) and squaring their sum ((a+b)^2). 2) There are algorithms and a flowchart for calculating the average of 5 user-input numbers. 3) An algorithm and flowchart show converting Celsius to Fahrenheit using the formula F=(1.8*C)+32.

Uploaded by

Abid jan
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/ 10

Assignment no 2

NAME:ABID JAN

SECTION: CB

ROLL NO: 13221

COURSE TITLE: INTRO TO COMPUTER PROGRAMMING

COURSE ID: CS106 [04]

2. Draw the flow charts and Algorithms for each of the following
requirement.

flowchart: a+b Start

a, b & c

a+b=c

Print c

Stop
N
Algorithm:
e
a+b
x
t

Sum of a b = c
Read input a
Read input b
c=a+b
Display c
Stop
N
e
x
t
Algorithm :(a+b)**2

Square root of a b = c
Read input a
Read input b
c=a**2 +b**2
Display c
Stop
N
e
x
t
flowchart: (a+b)**2 Start

a, b & c

a**2+b**2=c

Print c

Stop
N
e
x
t
Algorithm: Average of five user desire numbers.

Input five numbers


For number 1 to 5
Read numbers
Add the numbers
Any more number
If yes go to step 2
No AVG=SUM/5
Write AVG
STOP
N
e
x
t
Flowchart: Average of five user desire numbers.

Start

For number 1 to 5

Read
number 1 to
5

Add
numbers 1
to 5

Any more
number
Yes
No 1

1
AVG=SUM/
5

Write AVG

STOP

Algorithm:Co to Fahrenheit
Start
Read the value of Celsius
F=(1.8*Celsius)+32
Print F
Stop
N
e
Flowchart:Co to Fahrenheit
x
t

Start

Read the value of


celsius

F=(1.8*Celsius)+32

Print F

Stop
N
e
x
t

N
e
x
t
N
e
x
t

The End

You might also like