110,533
社区成员
发帖
与我相关
我的任务
分享
int oldValue;
int check(int newValue)
{
int result;
if(oldValue<newValue){
result = -1;
} else if(oldValue>newValue){
result = 1;
} else {
result = 0;
}
oldValue = newValue;
return result;
}