954,500 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

sign function

i want to write a function of sign function without using system.math library in c#.
plz help me how can i write this code???

umair125
Newbie Poster
14 posts since Jul 2009
Reputation Points: -10
Solved Threads: 0
 

The sign function returns 1 if the number is positive, 0 if it's zero and -1 if it is negative. You can implement that using the if statement.

ddanbe
Senior Poster
3,829 posts since Oct 2008
Reputation Points: 2,070
Solved Threads: 661
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: