大家来看看国际混乱C程序大赛,看谁的代码更混乱!!
像这样的代码或许效率好高或许很有新意,但是我是不推荐的。好的代码首先要有良好的可读性,其次才是效率!!否则大家写C干什么?直接用机器指令效率不是更快???
以下代码纯属搞笑[tk16]
main()
{
printf(&unix["\021%six\012\0"],(unix)["have"] + "fun" - 0x60);//诡异!!绝对是诡异!!
}
///////////////////////////////////////////////////////////////////////
//
// bible.c
//
// smith_135@163.com
// QQ:58101543
// 2004.7.10
// copyright (c) meteor135
// version 1.0
//
///////////////////////////////////////////////////////////////////////
/*
#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'}{nlw]!/*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);}
*/
///////////////////////////////////////////////////////////////////////
//"!ek;dc i@bK'(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry";
// !-------------------------------!
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
//
// @n'+,#'
// on the
//---------------------------------------------------------------------
// /*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l,+,/n{n+,/+#n+,/#;#q#n+,/+k#;*+,/
// first second third fourth fifth sixth seventh eighth ninth tenth eleventh twelfth
//---------------------------------------------------------------------
// 'r :'d*'3,}{w+K w'K:'+}e#';dq#'l q#'+d'K#!
// day of Christmas my true love gave to me
//---------------------------------------------------------------------
// /+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# ){nl]!
// twelve drummers drumming, eleven pipers piping, ten lords a-leaping,
//---------------------------------------------------------------------
// /n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#n'wk nw' iwk{KK{nl]!
// nine ladies dancing, eight maids a-milking, seven swans a-swimming,
//---------------------------------------------------------------------
// /w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlw]!
// six geese a-laying, five gold rings,
//---------------------------------------------------------------------
// /*de}'c ;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;#'rdq#w!
// four calling birds, three french hens, two turtle doves
//---------------------------------------------------------------------
// nr'/ ') }+}{rl#'{n' ')# }'+}##(!!/
// and a partridge in a pear tree.
//
///////////////////////////////////////////////////////////////////////
#include <stdio.h>
#ifdef __TURBOC__
#include <conio.h>
#endif
#define END_DAY 12
#define START_DAY 1
#if !(START_DAY>0&&END_DAY<=12&&START_DAY<=END_DAY)
#error "error! START_DAY or END_DAY is not in range!"
#endif
const int START_DELIMITERS = 0;
const int NUMBERS_DELIMITERS = 13;
const int GIFTS_DELIMITERS = 13;
const char * decodeTbl=
"!ek;dc i@bK'(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry";
const char * cryptograph=
"@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'}{nlw]!/*de}'c \
;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;#'rdq#w! nr'/ ') }+}{rl#'{n' ')# \
}'+}##(!!/";
void decodeAndPrint(int d)
{
const char *pc = cryptograph;
while (d < 0)
{
if (*pc++ == '/')
{
d++;
}
}
while (*pc != '/')
{
const char *p = decodeTbl;
while (*p != *pc) p++;
putchar(p[31]);
pc++;
}
}
void start()
{
decodeAndPrint( - START_DELIMITERS );
}
void number(int n)
{
decodeAndPrint( - (START_DELIMITERS+n) );
}
void dayToMe()
{
decodeAndPrint( - (START_DELIMITERS+NUMBERS_DELIMITERS) );
}
void gift(int g)
{
decodeAndPrint( g - (START_DELIMITERS+NUMBERS_DELIMITERS+GIFTS_DELIMITERS) );
}
void gifts(int g, int n)
{
if (g < n)
gifts(g + 1, n);
if (g > 0)
gift(g);
}
void printBible(int n)
{
#ifdef __TURBOC__
static int temp = 0;
if(++temp%5==0)
getch();
#endif
start();
number(n);
dayToMe();
gifts(1, n);
if( n < END_DAY)
printBible(n + 1);
}
void main()
{
#ifdef __TURBOC__
clrscr();
#endif
printBible(START_DAY);
#ifdef __TURBOC__
getch();
#endif
}
[[it] 本帖最后由 flyue 于 2008-5-1 21:29 编辑 [/it]] [tk13] 这也能运行 无语 我晕
[code]
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define O0O0 int
#define OO00o const char
#define oO0OO0Oo return
#define oo00o0o time
#define OoOoOo main
#define o0 long
#define oo0 while
#define OOo0 srand
#define OO0o scanf
#define Oo0Oo0oo0 rand
#define OOOOOOOOOOOO puts
#define ooooooooo printf
OO00o *oo = "少了!", *ooo = " 高了!", *O = "恭喜你猜对了!";
OO00o* OoO(O0O0 Oo, O0O0 OoOo){
oO0OO0Oo (Oo > OoOo) ? ooo : ((Oo < OoOo) ? oo : O);
}
O0O0 OOO(O0O0 Oo, O0O0 OoOo){
oO0OO0Oo OOOOOOOOOOOO(OoO(Oo, OoOo)),(Oo == OoOo) ? 1 : 0;
}
O0O0 OoOoOo(){
OOo0(oo00o0o(0));
o0 OoOo = Oo0Oo0oo0() % 1000 + 1, ooooo = 0, Oo = 0, OoOoo = 11;
oo0(--OoOoo)
(OO0o("%d", &Oo),(!OOO(Oo, OoOo)))? OOO(Oo, OoOo),ooooooooo("你还有%d次机会\n", OoOoo) : 1;
oO0OO0Oo 0;
}
[/code] 用宏了..呵呵 嗯,以前实在无聊写的一个小程序 ,直接替换了。。呵呵 看不懂啊,晕,看来学海无涯啊[tk02] 顶
看不懂 晕。看不懂 你太有才了 #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'}{nlw]!/*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);}
这段程序是打印歌曲The Days of Christmas,是程序风格的典型反面 太有才了!!写那玩意得累死!!无语
页:
[1]
