Flow Charts

  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Flow Charts as PDF for free.

More details

  • Words: 453
  • Pages: 8
1

ASSIGNMENT FLOW CHARTS Draw flow charts for each of the following. 1.

Read 3 numbers. Determine and display the sum, product and

average of 3 numbers. 2.

Read 2 numbers. Determine and display the larger and smaller

value amongst the 2 values entered by the user. 3.

Determine and display the sum of the following series:

1+3+5+7…………………n where n is entered by the user. 4.

Read values till -1 is not entered by the user. Determine and

display the total number of positive and the total number of negative values entered by the user. 5.

Determine and display the factorial of 25 numbers entered by

the user. 6.

Read in values and display them as long as the user does not

enter a negative value. 7.

Read values till a negative value is not entered by the user.

Determine and display the largest value entered by the user.

Assignment No 1 Flow Charts

2 1.

Read 3 numbers. Determine and display the sum, product and

average of 3 numbers.

START

Read a,b,c

Sum=a+b+c Prod=a*b*c Avg=Sum/3

Display Sum,Prod,Avg

STOP

Assignment No 1 Flow Charts

3 2.

Read 2 numbers. Determine and display the larger and smaller

value amongst the 2 values entered by the user.

START

Read a,b

a> b

F

Print”greater” ,b “Smaller No” a

T Print”greater” ,a “Smaller No” ,b

STOP

Assignment No 1 Flow Charts

4 3.

Determine and display the sum of the following series:

1+3+5+7…………………n where n is entered by the user. START

Read n

i=1,Sum=0

i<= n

F Print Sum

STOP

T

Sum=Sum+i

i=i + 2

Assignment No 1 Flow Charts

5 4.

Read values till -1 is not entered by the user. Determine and

display the total number of positive and the total number of negative values entered by the user.

START

Pos=0,Neg=0

READ n

n =1

F

Print Pos,Neg

STOP

T n >0

F

T Neg=Neg + 1

Pos=Pos + 1

Read n

Assignment No 1 Flow Charts

6 5.

Determine and display the factorial of 25 numbers entered by

the user.

START

i=1

i <=25

F

Print Prod

STOP

T Read N

Prod=1, j = 1

j=j+1

F

j <=n T

Prod=Prod * j

j=j+1 Assignment No 1 Flow Charts

7 6.

Read in values and display them as long as the user does not

enter a negative value. START

Read n

n >0

F

STOP

T

Print n

Read n

Assignment No 1 Flow Charts

8 7.

Read values till a negative value is not entered by the user.

Determine and display the largest value entered by the user.

START

Read N

Great=N

N >0

F

Print Great

STOP

T Great
F

T

Great =N

Read n

Assignment No 1 Flow Charts

Related Documents

Flow Charts
May 2020 17
Flow Charts
June 2020 8
Flow Charts By Smartdraw
November 2019 18
List Of Flow Charts
November 2019 26
Con Law Flow Charts
April 2020 8
Law Flow Charts
May 2020 8