int sign( int x ){
if(x>0){
x=1;
} else if(x<0){
x=-1;
} else{
x=0;
}
return x;
}
习题5-1 符号函数
最新推荐文章于 2024-07-18 19:36:20 发布
int sign( int x ){
if(x>0){
x=1;
} else if(x<0){
x=-1;
} else{
x=0;
}
return x;
}