Computer Science, asked by TbiaSamishta, 1 year ago

Write an algorithm to find whether a number is positive or negative

Answers

Answered by gokulraam0507
158

ALGORITHM TO FIND WHETHER NUMBER IS POSITIVE, NEGATIVE OR ZERO (IS ELSE-IF ELSE STRUCTURE)

  1. Num <-- 0.
  2. Read Num.
  3. Is (Num > 0) Then. Begin. Print “Positive” End. Else if (Num<0) Then. Begin. Print “Negative” End. Else. Begin. Print “Zero” End.
Answered by Sidyandex
222

Algorithm To Find Whether A Number Is Positive Or Negative is given below:

1. Input a number from the user.

2. If number is less than zero, then it is a negative integer.

3. Else if number is greater than zero, then it is a positive integer.

4. Else, the number is equal to zero.

5. End.

Similar questions