2分段函数
#include<iostream>
using namespace std;
int main()
{
double x,y;
cin>>x;
if(x>=1)
{
y=x-1;
cout<<y;
}
else
{
y=1-x;
cout<<y;
}
return 0;
#include<iostream>
using namespac