Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

knowing that ((!(x>0) && (x!==0)) || ((-3 < x) && (x<4)) can be write as (-infin

ID: 3678498 • Letter: K

Question

knowing that ((!(x>0) && (x!==0)) || ((-3 < x) && (x<4)) can be write as (-infiniti, 0) union (-3; 4); and the fact that bracket [] are used for inclusion,

write the interval represented in this condition:

if (   (!(x < 2.0)                && (x < 3.0)                )
      || (!(x < 0.0) && !(x == 0.0) && ((x < 1.0) || (x == 1.0)))
      || (!(x < -10.0)              && ((x < -2.0) || (x == -2.0)))
     )

Plz copy and paste the cpp

Explanation / Answer

#include<iostream.h>

#include<stdio.h>

int main()

{

if (   (!(x < 2.0) && (x < 3.0)                )
      || (!(x < 0.0) && !(x == 0.0) && ((x < 1.0) || (x == 1.0)))
      || (!(x < -10.0)              && ((x < -2.0) || (x == -2.0))) )

{

cout<<"the value of x is =",x;

}

return 0;

}

output :

enter the value of x: 6

it will display nothing and the cursor is simply binking that menas no value for that condition