This topic has been archived. It cannot be replied.
-
工作学习 / 学科技术 / 不跑程序, 能看出width/high*2的结果吗?var high=1
var width =1
for ( i in 1..100000000) {
width = 1 / high + width
high = 1 / width + high
}
print("width/high="+width/high*2)
-sxffff(lookingforjob);
2017-6-23
{145}
(#10899562@0)
-
width/high=2
-c007(国产007);
2017-6-23
(#10900721@0)
-
误差有点大。
-sxffff(lookingforjob);
2017-6-23
(#10900763@0)
-
I'm afraid that it's not predictable.
-sailor(Ocean & Mountain);
2017-6-23
(#10901006@0)
-
这个跑一下就知道了
-sxffff(lookingforjob);
2017-6-23
(#10901171@0)
-
c# 7.0 versionprivate static void Test()
{
System.Diagnostics.Debug.WriteLine(F(1) * 2);
double F(int i) { return i > 1000 ? 0 : 1 + i / (2.0 * i + 1) * F(i + 1); }
}
-xmlhttprequest(build5381);
2017-6-24
{197}
(#10901513@0)
-
这是7.0的新语法?函数里面可以定义函数?
-binghongcha76(一只大猫);
2017-6-29
(#10912056@0)
-
like js, eh?
-xmlhttprequest(build5381);
2017-6-29
(#10912070@0)
-
用了用c# 7,很好,已经不想再用老版本了,除了这个嵌套函数,那个增强型的tuple和deconstructors太好用了
-binghongcha76(一只大猫);
2017-10-24
(#11135654@0)