#include <iostream>
using namespace
std;
int main()
{
double x = 0.0;
cout << "Enter a value for x:
";
cin >>
x;
if (x < -0.5 && x >= -1.0)
{
cout << "x is
between -0.5 and -1.0" << endl;
}
else if (x < 0.0 && x >= -0.5)
{
cout << "x is
between 0.0 and -0.5" << endl;
}
else if (x >= 0.0 && x < 0.5)
{
cout << "x is
between 0.0 and 0.5" << endl;
}
else if (x >= 0.5 && x <= 1.0)
{
cout << "x is
between 0.5 and 1.0" << endl;
}
else cout << "x is out of
limits" << endl;
return 0;
}