Please help with the task, here is the condition Find the sum of a row with an accuracy to a member of a row smaller than 0.0001 for a given value and compare this sum with the control function. To calculate the next value of a series member, use a recurrent formula. http://stuffed.ru/images/100197-latex.html value x: -1 <x <1 Control function: arctg x

#include <iostream> #include <math.h> using namespace std; int main () { double x,stx,sint,e; int i,fakt,z; cout << "vvedi x " << endl; cin>>x; cout << "vvedi e " << endl; cin>>e; stx= x; fakt= 1; sint= 0; i= 1; z= 1; while (stx/fakt>=e) { sint=sint+z*stx/fakt; i=i+2; stx=stx*x*x; fakt=fakt*(i-1)*i; z=z*(-1); } double g = sin((double)(x)); cout <<"SIN: "<< g << endl; cout <<"SINT"<< sint << endl; if ( g==sint) {cout<<"ravni";} else {cout<<"ne ravni";} return 0; } 

Closed due to the fact that the essence of the question is not clear by the participants user194374, Grundy , sercxjo , D-side , Streletz 17 Jun '16 at 6:52 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • And what is the difficulty? Or just need to solve the problem for you? - BOPOH
  • @ f1292298, According to the rules of the forum, questions should not be limited to solving or completing student assignments. Please clarify what you have done yourself and what did not work out. - dzhioev
  • After installing dev c ++ 5.4.2, I get an error [Error] iostream.h when launching programs: No such file or directory although everything worked before, and I can’t really check my program if you can easily give me a ready one - f1292298
  • four
    give you ready?)) kidding what? It's for money and not on this site - DreamChild
  • one
    @ f1292298, you know, the funny thing is that in Windows in MinGW g ++ 3.4.5 (mingw-vista special r3) the program was translated without errors. Then what is the question? - avp

1 answer 1

[Error] iostream.h: No such file or directory

which follows from the error message, you need to connect iostream.h. What is the problem?

  • I tried to throw off the include folder with libs from the previous version but did not help - f1292298
  • @ f1292298, and you tried to write #include <iostream.h> in the first line instead of #include <iostream>? - Max Zhukov
  • @Max Zhukov and you yourself are sure of what you advise? iostream long ago (if I'm not mistaken, from the 1998 standard) in the #include directive is written without .h. And all these <iostream.h> are rubbish. And the problem described above has somewhat different roots - DreamChild
  • 2
    Something wrong. If the compiler does not find iostream.h , it means that the vehicle has #include <iostreаm.h> , and it has given us the wrong code. Or somewhere replaced the system header with an older version. In short, let him set up an environment in which hello world will be compiled, and then everything else. - VladD
  • Old song about iostream.h? Moved from the ancient borland compiler to something more modern ... - alexlz