Then you have to determine if you are in the desired region (which is not a cube):
1 2
bool withincircle = sqrt( x*x + y*y ) < 1; // if distance to the origin is < 1.
bool withinbox = (-1 * abs(x) + 4) > abs(y); // y = m * x + b. If calculated y @ x is > our y, it's in the box.
Then output if you're in the region:
1 2 3 4
if (withinbox && !withincircle)
cout << "You are in the region!" << endl;
else
cout << "You are not in the region" << endl;
dude your a genius, i tryed to do it in a easy way
#include <stdio.h>
#include <iostream.h>
#include <conio.h>
void main()
{
clrscr();
int x,y; //user input
int n,a,b; //program iput
a=4;
b=0;
cout<<"input x value";
cin>>x;
cout<<"input x value";
cin>>y;
if x>a
cout << "can't be in the cube" << endl;