Create a program for calculating the function using the loop operator with a precondition. The variable x changes with a step h on a given interval [a, b].
Help me find a bug
#include<cmath> #include <iostream> using namespace std; int main() { double z, x, xn, xk, h; cin >> xn >> xk >> h; while (x <= xk) if (xn <= x < 0) { z = cos(x) * sin(x) / 2; } if (0 <= x <= 2 * xk / 3) { z = pow(sin(x + 1), 2); } if (2 * xk / 3 < x <= xk) { z = pow(cos(x - 1), 2); printf("%6.2f5s %9.3f", x, z); } x = x + h; return 0; } 