Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Problem_04
- {
- using System;
- public class StartUp
- {
- public static void Main()
- {
- int count = int.Parse(Console.ReadLine());
- double R = 0;
- for (int i = 1; i <= count; i++)
- {
- R += 1.0 / (1 + i);
- }
- Console.WriteLine("Стойността е : {0:F5}", R);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement