Advertisement
Dam4eeeg

Untitled

Apr 10th, 2020
691
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.42 KB | None | 0 0
  1. const double eps=0.00000001;
  2. double x;
  3. double summ=0.0;
  4. double j=((-1) * ( (math.pow(x,2+1)) / math.factorial(2 + 1) )); //Рассчет первого элемента
  5. x=Convert.Todouble(tb1.Text);
  6. for (int64 n=2; eps<=j;n++) //Рассчет второго и последующих
  7. {
  8.     j=math.pow(-1,n) * ( (math.pow(x,2*n+1)) / math.factorial(2 * n + 1) );
  9.     summ=summ += j;
  10. }
  11. label3.Text=Convert.Tostring(summ);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement