#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;
}
if (x < 0.0 && x >= -0.5)
{
cout << "x is
between 0.0 and -0.5" << endl;
}
if (x >= 0.0 && x < 0.5)
{
cout << "x is
greater than or equal to 0.0"
<< "
but less than 0.5" << endl;
}
if (x >= 0.5 && x <= 1.0)
{
cout << "x is
between 0.5 and 1.0" << endl;
}
if (x < -1.0 || x > 1.0) {
cout << "x is
out of limits" << endl;
}
return 0;
}