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 ConsoleApp2
- {
- class Program
- {
- static double F_n(double n)
- {
- if (n==1) { return 5; }
- else { return (F_n(n - 1)) / (n * n + n + 1); }
- }
- static void Main()
- {
- Console.Write("Please enter the n=");
- double n = double.Parse(Console.ReadLine());
- Console.WriteLine("{0}",F_n(n));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement