#include <stdio.h>
int sign( int x );
int main()
{
int x;
scanf("%d", &x);
printf("sign(%d) = %d\n", x, sign(x));
return 0;
}
int sign( int x )
{
if(x > 0) return 1;
if(x == 0)return 0;
if(x < 0)return -1;
}
实现符号函数sign(x)
猜你喜欢
转载自blog.csdn.net/qq_52001969/article/details/111453552
今日推荐
周排行