#include<iostream.h>
void main()
{
int x,y;
cin>>x;
if(x>=1)
y=x-1;
else
y=-x-1;
cout<<y;
}
C++作业2:分段函数
最新推荐文章于 2022-06-02 17:26:37 发布
#include<iostream.h>
void main()
{
int x,y;
cin>>x;
if(x>=1)
y=x-1;
else
y=-x-1;
cout<<y;
}