Ishant S. answered 12/22/20
Tutor
New to Wyzant
Just be Curious
you can compare the number from 0
if(num>=0)
return(+1)
else
return(-1)
or you can add a flag to the if statement and return that flag
for mathematical operations include the header line
#include<maths.h>
or stl library