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;
- using System.Threading.Tasks;
- namespace ConsoleApp1
- {
- class Program
- {
- public static double q(int n, double x)
- {
- return (-x) / (8 * n * n + 20 * n + 12);
- }
- static void Main(string[] args)
- {
- int n;
- double sum = 0;
- double f ;
- double e = 0.0001;
- for (double x = 0.1; x <= 1.7; x += 0.1)
- {
- n = 0;
- f = 1;
- while (Math.Abs(f) >= e)
- {
- sum = sum + f;
- f = f * q(n, x);
- n++;
- }
- Console.WriteLine("{0}", sum);
- sum = 0;
- }
- Console.WriteLine("{0}", sum);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement