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.
1
Expert's answer
2013-02-19T10:10:18-0500
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

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS