flowcharts

29
1. Draw a flowchart for sum of any 2 numbers? Start Stop Clear WA Sum = A + B Input A, B Print ‘Sum’

Upload: akyadav123

Post on 02-Nov-2014

73 views

Category:

Documents


0 download

DESCRIPTION

flowcharts

TRANSCRIPT

Page 1: flowcharts

1. Draw a flowchart for sum of any 2 numbers?

Start

Stop

Clear WA

Sum = A + B

InputA, B

Print ‘Sum’

Page 2: flowcharts

2. Draw a flowchart for sum of any 3 numbers?

Start

Stop

Clear WA

Sum = A + B + C

InputA, B, C

Print ‘Sum’

Page 3: flowcharts

3. Draw a flowchart to find out the Simple Interest?

Start

Stop

Clear WA

SI = (P * T * R)/100

InputP, T, R

Print ‘SI’

SI – Simple Interest

P – Principle

T – Time

R – Rate of Interest

Page 4: flowcharts

4. Draw a flowchart for sum of any 50 numbers?

Y

5. Draw a flowchart for sum of any 4000 numbers?

Start

Stop

Clear WA

Sum = Sum + n

Input‘n’

Print ‘Sum’

Sum = 0, Count = 0

If Count >

50

Count = Count +1

Page 5: flowcharts

Start

Stop

Clear WA

Sum = Sum + n

Input‘n’

Print ‘Sum’

Sum = 0, Count = 0

If

Count > 4000

Count = Count +1

Page 6: flowcharts

6. Draw a flowchart for sum of any N numbers?

Start

Stop

Clear WA

Sum = Sum + n

Input‘n’

Print ‘Sum’

Sum = 0, Count = 0

If

Count > N

Input‘N’

Count = Count +1

Page 7: flowcharts

7. Draw a flowchart to find out the first ‘n’ Natural Numbers?

Start

Stop

Clear WA

Sum = n( n+1)/2

Inputn

Print ‘Sum’

Page 8: flowcharts

8. Draw a flowchart to find out the first ‘5’ Natural Numbers? ( without using the above formula)

Start

Stop

Sum = 0, Count = 1

Print ‘Sum’

Sum = Sum + Count

Count = Count + 1

If Count > 5

Page 9: flowcharts

9. Draw a flowchart to find out the sum of first ‘500’ Natural Numbers?

Start

Stop

Sum = 0, Count = 1

Print ‘Sum’

Sum = Sum + Count

Count = Count + 1

If Count >

500

Page 10: flowcharts

10. Draw a flowchart to find out the sum of first ‘N’ Natural Numbers? ( without using the formula)

Start

Stop

Sum = 0, Count = 1

Print ‘Sum’

Sum = Sum + Count

Count = Count + 1

If Count >N

Input N

Clear WA

Page 11: flowcharts

11. Draw a flowchart to find out 5!?

Start

Stop

Prod = 1, Count = 1

Print ‘Prod’

Prod = Prod * Count

Count = Count + 1

If Count > 5

Clear WA

Page 12: flowcharts

12. Draw a flowchart to find out n!?

Start

Stop

Prod = 1, Count = 1

Print ‘Prod’

Prod = Prod * Count

Count = Count + 1

If Count >N

Input N

Clear WA

Page 13: flowcharts

13. Draw a flowchart to find out the average of any 3 numbers?

Start

Stop

Clear WA

Avg = (A + B + C)/3

InputA, B, C

Print ‘Avg’

Page 14: flowcharts

14. Draw a flowchart to find out the whether a number is Even or Odd?

Start

Stop

Input‘n’

Print ‘n is Even’

Is n is divisible by 2

Print ‘n is Odd’

Page 15: flowcharts

15. Draw a flowchart to find out the greatest to any 2 numbers?

Start

Input

A, B

Print ‘B is Greater‘

Stop

Is A > B

Print

‘A is Greater’ ‘

If A = B

Print ‘A

and B are equal’

Page 16: flowcharts

16. Draw a flowchart to find out the greatest to any 3 numbers?

Start

Input A,

B, C

Print ‘A is Greatest‘

Stop

Is A > B

Print ‘B is Greatest’ ‘

Is B > C

Is A > C

Print ‘C is Greatest’

Page 17: flowcharts

17. Draw a flowchart to find out the greatest to any 300 numbers?

Start

Input n

Print ‘Max‘

Stop

If

Max>n

C = 0, Max = 0

C = C + 1

If C=300

Max = n

Page 18: flowcharts

18. Draw a flowchart to find out the greatest to any N numbers?

Start

Input

‘N’

Print ‘Max‘

Stop

If

Max> n

C=0, Max=0

C = C + 1

If C=N

Max = n

Input n

Page 19: flowcharts

19. Draw a flowchart to print all Natural numbers UPTO 50?

Start

Stop

Count = 1

Count = Count + 1

If Count >

50

Print ‘Count’

Page 20: flowcharts

20. Draw a flowchart to print all Natural numbers UPTO N?

21. Draw a flowchart to print EVEN numbers UPTO 50?

Start

Stop

Count = 1

Count = Count + 1

If Count >

N

Print ‘Count’

Page 21: flowcharts

22. Draw a flowchart to print EVEN numbers UPTO N?

Start

Stop

Count = 2

Count = Count + 2

If Count >

50

Print ‘Count’

Page 22: flowcharts

23. Draw a flowchart to print first 50 even numbers?

Start

Stop

Count = 2

Count = Count + 2

If Count >

N

Print ‘Count’

Start

Stop

i = 2, Count = 0

i = i + 2

If Count >

50

Print ‘i’

Count = Count + 1

Page 23: flowcharts
Page 24: flowcharts

24. Draw a flowchart to print ODD numbers UPTO 50?

Start

Stop

Count = 1

Count = Count + 2

If Count >

50

Print ‘Count’

Page 25: flowcharts

25. Draw a flowchart to print ODD numbers UPTO N?

Start

Stop

Count = 1

Count = Count + 2

If Count >

N

Print ‘Count’

Page 26: flowcharts

26. Draw a flowchart to print first 50 odd numbers?

Start

Stop

i = 1, Count = 0

i = i + 2

If Count >

50

Print ‘i’

Count = Count + 1