Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <windows.h>
- #include <math.h>
- using namespace std;
- char bufrus[256];
- char* Rus(const char* str){
- CharToOemA(str,bufrus);
- return bufrus;
- }
- int main()
- {
- cout << Rus("Введи E: ");
- double E,x;
- cin >> E;
- cout << Rus("Введи x: ");
- cin >> x;
- double sinx = x;
- int factr = 3;
- int fact = 1*2*3;
- double xxx = x*x*x;
- while(abs(xxx/fact)>E)
- {
- sinx = sinx + xxx/fact;
- xxx = xxx * x * x;
- fact = fact * (factr+1) * (factr+2);
- factr = factr + 2;
- }
- cout << Rus("ответ ") << sinx;
- cin.get();
- cin.get();
- return 0;
- }
Add Comment
Please, Sign In to add comment