Fundamentals of Computer Programming - Old Questions

1. Draw a flow chart and write an algorithm to find out whether a given number is zero or +ve or -ve.

6 marks | Asked in 2073


1.      Start

2.      Print”Enter a number”.

3.      Read n.

4.      If n>0 then print “The number is positive”

Else if n<0 print “The number is negative”

Else “The number is zero”.

5.      Stop