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???

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.