正差值

来源:互联网 发布:linux开机自动运行脚本 编辑:程序博客网 时间:2024/04/27 20:46

#include <iostream>using namespace std;int main(){int x,y;    cin>>x;    if(x>=1){    y=x-1    ;}    else y=-x+1;    cout<<"y="<<y<<endl;    return 0;}


 输出结果

学习总结 还行

0 0
原创粉丝点击