#include<stdio.h>
int main()
{
int n;
scanf("%d", &n);
if(n>0){
printf("sign(%d) = 1",n);
}else if(n<0){
printf("sign(%d) = -1",n);
}else{
printf("sign(%d) = 0",n);
}
return 0;
}
标签:函数,符号,int,scanf,练习,sign,else,printf,main
来源: https://www.cnblogs.com/ytmsnzy/p/16591456.html