Flow Charts

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

AIM OF PRACTICAL:

W a p which calculate the sum and product of two nos when first no. is greater
than second no. otherwise print sorry.

START

Int a,b

True a>b

False
Sum=a+b

Product=a*b

Sorry

STOP
AIM OF PRACTICAL:
/* W a p to calculate the function F which is given by F=x+y when n>0

=x-y when n<=0 */

START

Int n

If n>0

true false

n<=0
X+y
true false

x-y Enter correct no.


AIM OF PRACTICAL:
/* W a p to add the odd numbers from 0 to100 using while loop. */

START

Int i , sum

i=0 , sum=0

I<=100
false

true
i%2!=0 false

true

Sum=int i , i++

EXIT
AIM OF PRACTICAL:
/* W a p using for loop which finds the sum and average of n given numbers */

START

Int i,n,sum , num

i=0

i<=n false

true

i++

Read num

Sum=sum+num

Avg=sum/n

EXIT
AIM OF PRACTICAL:
/* W a p to add the odd nos. from 0 to 100 using do while loop. */

START

int i , sum

Initialize i=1

Sum=0

i%2!=0
false

true

sum= sum + i

i++

false I<=100 true

EXIT

You might also like