cout<<"max random value is "<<MaxRandomValue<<endl<<endl;
//input
do{
cout<<"x1: "; cin>>x1;
}
while (x1<0);
do{
cout<<"y1: "; cin>>y1;
}
while (y1<0);
do{
cout<<"x2: "; cin>>x2;
}
while (x2<x1);
do{
cout<<"y2: "; cin>>y2;
}
while (y2<y1);
It ask for x1 and y1 to be greater than 0, x2 and y2 to be greater respectively to x1 and y1.
Than it try to find rx and ry to be in between of x1, x2 and y1, y2 assigning them random values, eg: