KeyFC欢迎致辞,点击播放
资源、介绍、历史、Q群等新人必读
KeyFC 社区总索引
如果你找到这个笔记本,请把它邮寄给我们的回忆
KeyFC 漂流瓶传递活动 Since 2011
 

超强的C代码......四行算出PI 后面800位......

[ 12660 查看 / 38 回复 ]

回复:超强的C代码......四行算出PI 后面800位......

第2个编译不出来
TOP

回复:超强的C代码......四行算出PI 后面800位......

他不会把变量名字起得有特点一点顺便把这主函数结构还有循环条件什么的写清楚一点再好好缩进一下也多不出几行吧

你看长单句就算是用大家都认识的字写也不太好读……
AJI,舰狗
TOP

回复:超强的C代码......四行算出PI 后面800位......

用规范化的格式写出来...不然给人很乱的感觉= =
TOP

回复:超强的C代码......四行算出PI 后面800位......

...看来我习惯读长单句了...
MISSING IN ACTION
TOP

回复:超强的C代码......四行算出PI 后面800位......

以下引用fish在2006-1-23 23:42:58的发言:
第2个编译不出来


不会吧~~~我都编译出来了~~~~


再发一遍.......
#include <stdio.h>
main(t,_,a)char *a;{return!0<t?t<3?main(-79,-13,a+main(-87,1-_,
main(-86,0,a+1)+a)):1,t<_?main(t+1,_,a):3,main(-94,-27+t,a)&&t==2?_<13?
main(2,_+1,"%s %d %d\n"):9:16:t<0?t<-72?main(_,t,
"@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l+,/n{n+,/+#n+,/#;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l q#'+d'K#!/+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# ){nl]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#n'wk nw' iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c ;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;#'rdq#w! nr'/ ') }+}{rl#'{n' ')# }'+}##(!!/")
:t<-50?_==*a?putchar(31[a]):main(-65,_,a+1):main((*a=='/')+t,_,a+1)
  :0<t?main(2,2,"%s"):*a=='/'||main(0,main(-61,*a,
"!ek;dc i@bK'(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry"),a+1);}
我是宇宙中的一颗不显眼的小星星。对我来说,朋友们就像星空里的其他星星们那样的美丽且遥远。我总是想要触摸到他们,却总是够不到他们那遥远的身影。于是我开始感到悲伤,开始讨厌那广阔无边的宇宙。是它,把我们分开了!直到某一天,美丽的流星雨带来了朋友们的微笑。我才知道,原来自己是多么的傻。对啊,我们是朋友,无论有多么遥远的距离,我们永远是朋友。于是我又抬头看了看我的朋友们,看到的再也不是悲伤。因为他们都在自己努力着,他们都在向我一闪一闪地展示他们坚强的笑容...
TOP

回复:超强的C代码......四行算出PI 后面800位......

--------------------Configuration: Source1 - Win32 Release--------------------
Compiling...
Source1.cpp
C:\Documents and Settings\fish\Desktop\Source1.cpp(2) : error C2065: 't' : undeclared identifier
C:\Documents and Settings\fish\Desktop\Source1.cpp(2) : error C2065: '_' : undeclared identifier
C:\Documents and Settings\fish\Desktop\Source1.cpp(2) : error C2065: 'a' : undeclared identifier
C:\Documents and Settings\fish\Desktop\Source1.cpp(2) : error C2448: '<Unknown>' : function-style initializer appears to be a function definition
C:\Documents and Settings\fish\Desktop\Source1.cpp(2) : fatal error C1004: unexpected end of file found
Error executing cl.exe.

Source1.exe - 5 error(s), 0 warning(s)

Debug方式编译也不通过
Visual C++ 6.0 SP5

----------------------------------
刚试了Visual C++ 2005,还是不行
------ Build started: Project: Source1, Configuration: Release Win32 ------
Compiling...
Source1.cpp
.\Source1.cpp(2) : error C2065: 't' : undeclared identifier
.\Source1.cpp(2) : error C2065: '_' : undeclared identifier
.\Source1.cpp(2) : error C2065: 'a' : undeclared identifier
.\Source1.cpp(2) : error C2448: 'main' : function-style initializer appears to be a function definition
.\Source1.cpp(2) : warning C4129: ';' : unrecognized character escape sequence
.\Source1.cpp(2) : warning C4129: 'q' : unrecognized character escape sequence
.\Source1.cpp(2) : warning C4129: ')' : unrecognized character escape sequence
.\Source1.cpp(2) : warning C4129: 'i' : unrecognized character escape sequence
.\Source1.cpp(2) : warning C4129: ';' : unrecognized character escape sequence
.\Source1.cpp(2) : warning C4129: '}' : unrecognized character escape sequence
Source1 - 4 error(s), 6 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
TOP

回复:超强的C代码......四行算出PI 后面800位......

或许KFC有过滤-_____-………………

VC++.NET(7.1版的= =) 也无法编译后一个

4处错误orz


------ 已启动生成: 项目: temp, 配置: Debug Win32 ------

正在编译...
temp.cpp
temp.cpp(7) : error C2065: “t” : 未声明的标识符
temp.cpp(7) : error C2065: “_” : 未声明的标识符
temp.cpp(7) : error C2065: “a” : 未声明的标识符
temp.cpp(7) : error C2448: “main” : 函数样式初始值设定项类似函数定义
AJI,舰狗
TOP

回复:超强的C代码......四行算出PI 后面800位......

这种变态的代码见过一次,可读性很差。
第一个估计是用到了PI的某个极数展开式来计算的。
第二个完全看不懂。
TOP

回复:超强的C代码......四行算出PI 后面800位......

我用的是TC2.0~~~~~~
还没有教过C++~~~~
我的机子上编译没有问题啊~~~~~
运行结果完全出乎意料......
我是宇宙中的一颗不显眼的小星星。对我来说,朋友们就像星空里的其他星星们那样的美丽且遥远。我总是想要触摸到他们,却总是够不到他们那遥远的身影。于是我开始感到悲伤,开始讨厌那广阔无边的宇宙。是它,把我们分开了!直到某一天,美丽的流星雨带来了朋友们的微笑。我才知道,原来自己是多么的傻。对啊,我们是朋友,无论有多么遥远的距离,我们永远是朋友。于是我又抬头看了看我的朋友们,看到的再也不是悲伤。因为他们都在自己努力着,他们都在向我一闪一闪地展示他们坚强的笑容...
TOP

回复:超强的C代码......四行算出PI 后面800位......

弟兄们了解IOCCC么?
可以google一下~~~
TOP