题解 | #计算y的值#
计算y的值
https://www.nowcoder.com/practice/61a0f16117484d219b59c62224b33b1c
#include <stdio.h> int text(int x) { int ret=0; if(x<0) { ret=1; } else if(x==0) { ret=0; } else { ret=-1; } return ret; } int main() { int x=0; scanf("%d",&x); int y=text(x); printf("%d",y); return 0; }
c语言刷题 文章被收录于专栏
c语言刷题题目