Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<math.h>
- #include<iostream>
- #define pi acos(-1.0)
- using namespace std;
- int main()
- {
- setlocale(LC_ALL, "RUS");
- double x, s, y, a, b, h, i, d, f, comp, g;
- cout << "x="; cin >> x;
- b = pi;
- h = pi / 25;
- a = pi / 5;
- y = ((x * x) - ((pi * pi) / 3));
- i = 1;
- s = 0;
- while(i<999)
- {
- s += (pow(-1, i) * cos(i * x)) / (i * i);
- i++;
- }
- comp = 1;
- d = s;
- f = 1;
- g = 1;
- while (d != 0 and f != 0)
- {
- d = fmod(d, 1);
- f = fmod(d, 1);
- d = f * 10;
- g = int(d);
- comp *= g;
- }
- if (comp < 0)
- {
- comp *= -1;
- }
- cout << "Произведение цифр числа=" << comp<<"\n";
- cout << "d=" << d << "\n";
- cout << "s=" << s;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement