Advertisement
Lyubohd

Variant1_Zad3

Jun 26th, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.41 KB | None | 0 0
  1. namespace Variant1_Zad3
  2. {
  3.     using System;
  4.  
  5.     public class StartUp
  6.     {
  7.         public static void Main()
  8.         {
  9.             int count = int.Parse(Console.ReadLine());
  10.             double R = 0;
  11.  
  12.             for (int i = 1; i <= count; i++)
  13.             {
  14.                 R += 1.0 / (1 + i * i);
  15.             }
  16.  
  17.             Console.WriteLine("Стойността е : {0:F4}", R);
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement