Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- int main() {
- setlocale(LC_ALL, "Russian");
- int n, i;
- double S = 0.0, Ssin = 0.0;
- cout << "Введите значение n (n > 0): ";
- cin >> n;
- for (i = 1; i <= n; i++) {
- Ssin += sin(i);
- S += 1 / Ssin;
- }
- printf("S: %6.14lf", S);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement