Print the values of the function z = sin (x) + cos (x) that are in the interval (-0.2; 0.8) for x changing on the interval [4, -6] in increments of 0.91. Explain the task
as I understood it:
#include "stdio.h" #include "math.h" #include "iostream.h" #include "conio.h" void main() { clrscr(); float x,z; int i; for (i=-6; (i<=4) && (z>=-0.2) && (z<=0.8); i=i+0.91) { x=i; z=sin(x)+cos(x); cout <<i<<" "<<z<<" "; } getch(); } Only does not work :)