Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace _4._4
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.Write("Введите точность e: ");
- double e = double.Parse(Console.ReadLine());
- double a = 1, s = 0;
- int i = 2;
- while (Math.Abs(a) >= e)
- {
- s += a;
- a /= Math.Pow(i, 2) - 1;
- i++;
- }
- Console.Write("{0:f6}", s);
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement