int sign( int x )
{
int t=0;
if(x>0)
{
t=1;
}
else if(x==0)
{
t=0;
}
else
{
t=-1;
}
return t;
}
6-3 符号函数 (10分)
最新推荐文章于 2023-11-01 20:39:30 发布
int sign( int x )
{
int t=0;
if(x>0)
{
t=1;
}
else if(x==0)
{
t=0;
}
else
{
t=-1;
}
return t;
}