Competitive Programming
Try To Help To Generate & Improve The Idea Of Competitive Programming
Wednesday, August 23, 2017
2166 Square Root of 2 URI Problem Only Solution In C#
using System;
class Exercise8
{
static void Main()
{
int N=Convert.ToInt32(Console.ReadLine());
double ans=0.0;
for(int i=0;i<N;i++)
{
ans=ans+2.0;
ans=(1.0/ans);
}
ans+=1.00;
Console.WriteLine(ans.ToString("0.0000000000"));
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment