/*。
*Copyright(c)2014,烟台大学计算机学院
*All right reserved,
*文件名:test.cpp
*作者:liu_feng_zi_
*完成日期:2014年10月15日
*版本号:v1.0
*
问题描述:
*输入描述:输入x
*程序输出:输出Y
*/
#include <iostream>
using namespace std;
int main()
{
int x,y;
cin>>x;
if(x>=1)
y=x-1;
else if(x<1)
y=-x+1;
cout<<"y="<<y<<endl;
return 0;
}
运行结果: