Advertisement
Ochkasty_Dino

Practicum5-III-2

Oct 20th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.53 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp2
  8. {
  9.     class Program
  10.     {
  11.         static double F_n(double n)
  12.         {
  13.             if (n==1) { return 5; }
  14.             else { return (F_n(n - 1)) / (n * n + n + 1); }
  15.         }
  16.         static void Main()
  17.         {
  18.             Console.Write("Please enter the n=");
  19.             double n = double.Parse(Console.ReadLine());
  20.             Console.WriteLine("{0}",F_n(n));
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement