R
R
Ruslan Tilyaev2020-11-05 08:27:44
C++ / C#
Ruslan Tilyaev, 2020-11-05 08:27:44

Has the task been completed correctly?

5fa38d3ca4e32641421442.png

int main() {
  bool a = true, b = false;
  int x = 7;

  if (a || b && !( pow(x,2) < 12 || 2*x <= 5 ) && exp(x-1) > 7)
  {
    cout << "Z > 7";
  }

  
  return 0;
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Egorithm, 2020-11-05
@Heckfy325

Confused conjunction with disjunction:

const int  x = 7;
const bool A = true;
const bool B = false;

std::cout << std::boolalpha
          << A && B || !(x*x < 12 && 2*x <= 5) || std::exp(x-1) > 7
          << std::endl;

R
Ronald McDonald, 2020-11-05
@Zoominger

cout << "Z > 7";

Bgg, you just output the answer, and the whole solution in this case does not make sense at all.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question