• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 144
  • Last Modified:

Number

Hi,

How can I find out that the given number is positive or negative?

ayha
0
ayha1999
Asked:
ayha1999
2 Solutions
 
Harisha M GCommented:
Hi,

If(Num > 0) Then
    MsgBox("Number is positive")
ElseIf(Num < 0) Then
    MsgBox("Number is negative")
Else
    MsgBox("Number is 0")
End If

---
Harish
0
 
jrschererCommented:
Hi,
In System.Math you can find the shared function Sign(X) as integer
It returns 1 for positive, 0 for zero and -1 for negative X
Jack.net

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now