题解 | #计算y的值#
计算y的值
https://www.nowcoder.com/practice/61a0f16117484d219b59c62224b33b1c
#include <stdio.h> int main() { int x; scanf("%d",&x); if(x>0){ printf("%d",-1); } else if(x<0){ printf("%d",1); } else { printf("%d",0); } }
计算y的值
https://www.nowcoder.com/practice/61a0f16117484d219b59c62224b33b1c
#include <stdio.h> int main() { int x; scanf("%d",&x); if(x>0){ printf("%d",-1); } else if(x<0){ printf("%d",1); } else { printf("%d",0); } }
相关推荐