Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //практическая работа №4,5, вариант 1
- #include <iostream>
- #include <Windows.h>
- #include <math.h>
- using namespace std;
- int main()
- { setlocale(LC_ALL, "Russian");
- int n;
- cout << "Введите значение n" << "\n";
- cin >> n;
- double sum, x;
- sum = 0;
- for (int i = 0; i <= n; i++)
- {
- x = pow(sin(1 + 0.1), i);
- sum = sum + sin(x);
- }
- cout << "\n" << "Значение суммы равно " << sum;
- cout << "\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement