# Answer to Question #24572 in C++ for Surya

Question #24572

Use the top-down modular and pseudo code to design a program. Input a number entered by the user and display "Positive" if it is greater than zero, "Negative" if it is less than zero, and "Zero" if it is equal to zero.

Expert's answer

function InputNumber : integer

procedure WriteLine(line : string)

procedure CheckTheNumber(number : integer)

begin

if (number == 0)

WriteLine("Zero")

elif (number > 0)

WriteLine("Positive")

else

WriteLine("Negative")

end

program Main

integer a

begin

a = InputNumber()

CheckTheNumber(number)

end

procedure WriteLine(line : string)

procedure CheckTheNumber(number : integer)

begin

if (number == 0)

WriteLine("Zero")

elif (number > 0)

WriteLine("Positive")

else

WriteLine("Negative")

end

program Main

integer a

begin

a = InputNumber()

CheckTheNumber(number)

end

Need a fast expert's response?

Submit orderand get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

## Comments

## Leave a comment