#include<stdio.h>
int sign(double x);
int main()
{
double x;
scanf("%lf",&x);
printf("%d",sign(x));
return 0;
}
int sign(double x)
{int a;
if(x>0)
{
a=1;
printf("%d",a);}
else
if(x==0){
a=0;
printf("%d",a);}
else
{
a=-1;
printf("%d",a);} return a;}
标签:return,int,double,sign,printf,else,10.14 From: https://blog.51cto.com/u_15758636/5759221