totoyo 发表于 2007-9-4 17:36:00

仅献给学过C语言的朋友们

<div><font size="4">result love(boy, girl)&nbsp;&nbsp; <div>    {&nbsp;&nbsp; </div><div>    if( boy.有房() and boy.有车() )&nbsp;&nbsp; </div><div>    {&nbsp;&nbsp; </div><div>     boy.set(nothing);&nbsp;&nbsp; </div><div>     return girl.嫁给(boy);&nbsp;&nbsp; </div><div>    }&nbsp;&nbsp;<font size="3">
                                </font></div></font></div><div>    {&nbsp;&nbsp; </div><div>    if( boy.有房() and boy.有车() )&nbsp;&nbsp; </div><div>    {&nbsp;&nbsp; </div><div>     boy.set(nothing);&nbsp;&nbsp; </div><div>     return girl.嫁给(boy);&nbsp;&nbsp; </div><div>    }&nbsp;&nbsp;<font size="3">
                </font></div><div><font size="4">    if( girl.愿意等() )&nbsp;&nbsp; <div>    {&nbsp;&nbsp; </div><div>    &nbsp;&nbsp;while(!(boy.赚钱 &gt; 100,000 and girl.感情 &gt; 8 ) )&nbsp;&nbsp; </div><div>    &nbsp;&nbsp;{&nbsp;&nbsp; </div><div>    &nbsp;&nbsp;for( day=1; day &lt;=365; day++)&nbsp;&nbsp; </div><div>    &nbsp;&nbsp;{&nbsp;&nbsp; </div><div>    &nbsp;&nbsp;if( day == 情人节 )&nbsp;&nbsp; </div><div>    &nbsp;&nbsp; if( boy.givegirl(玫瑰) )&nbsp;&nbsp; </div><div>    &nbsp;&nbsp; girl.感情++;&nbsp;&nbsp; </div><div>    &nbsp;&nbsp; else&nbsp;&nbsp; </div><div>    &nbsp;&nbsp; girl.感情--; </div><div>  &nbsp;&nbsp; </div><div>     if( day == girl.生日)&nbsp;&nbsp; </div><div>    &nbsp;&nbsp;if( boy.givegirl(玫瑰) )&nbsp;&nbsp; </div><div>    &nbsp;&nbsp; girl.感情++;&nbsp;&nbsp; </div><div>    &nbsp;&nbsp;else&nbsp;&nbsp; </div><div>    &nbsp;&nbsp; girl.感情--;&nbsp;&nbsp; </div><div>    &nbsp;&nbsp; boy.拼命赚钱();&nbsp;&nbsp; </div><div>     }&nbsp;&nbsp; </div><div>     }&nbsp;&nbsp;<font size="3">
                                </font></div></font></div><div>    {&nbsp;&nbsp; </div><div>    &nbsp;&nbsp;while(!(boy.赚钱 &gt; 100,000 and girl.感情 &gt; 8 ) )&nbsp;&nbsp; </div><div>    &nbsp;&nbsp;{&nbsp;&nbsp; </div><div>    &nbsp;&nbsp;for( day=1; day &lt;=365; day++)&nbsp;&nbsp; </div><div>    &nbsp;&nbsp;{&nbsp;&nbsp; </div><div>    &nbsp;&nbsp;if( day == 情人节 )&nbsp;&nbsp; </div><div>    &nbsp;&nbsp; if( boy.givegirl(玫瑰) )&nbsp;&nbsp; </div><div>    &nbsp;&nbsp; girl.感情++;&nbsp;&nbsp; </div><div>    &nbsp;&nbsp; else&nbsp;&nbsp; </div><div>    &nbsp;&nbsp; girl.感情--; </div><div>  &nbsp;&nbsp; </div><div>     if( day == girl.生日)&nbsp;&nbsp; </div><div>    &nbsp;&nbsp;if( boy.givegirl(玫瑰) )&nbsp;&nbsp; </div><div>    &nbsp;&nbsp; girl.感情++;&nbsp;&nbsp; </div><div>    &nbsp;&nbsp;else&nbsp;&nbsp; </div><div>    &nbsp;&nbsp; girl.感情--;&nbsp;&nbsp; </div><div>    &nbsp;&nbsp; boy.拼命赚钱();&nbsp;&nbsp; </div><div>     }&nbsp;&nbsp; </div><div>     }&nbsp;&nbsp;<font size="3">
                </font></div><div><font size="4">     if( boy.有房() and boy.有车() )&nbsp;&nbsp; <div>     {&nbsp;&nbsp; </div><div>    &nbsp;&nbsp;boy.set(nothing);&nbsp;&nbsp; </div><div>    &nbsp;&nbsp;return girl.嫁给(boy);&nbsp;&nbsp; </div><div>     }&nbsp;&nbsp; </div><div>     年龄++;&nbsp;&nbsp; </div><div>     girl.感情--;&nbsp;&nbsp; </div><div>     }&nbsp;&nbsp; </div><div>     return girl.goto( another_boy);&nbsp;&nbsp; </div><div>     }<font size="3">&nbsp;&nbsp;&nbsp;&nbsp;</font></div></font></div><div>     {&nbsp;&nbsp; </div><div>    &nbsp;&nbsp;boy.set(nothing);&nbsp;&nbsp; </div><div>    &nbsp;&nbsp;return girl.嫁给(boy);&nbsp;&nbsp; </div><div>     }&nbsp;&nbsp; </div><div>     年龄++;&nbsp;&nbsp; </div><div>     girl.感情--;&nbsp;&nbsp; </div><div>     }&nbsp;&nbsp; </div><div>     return girl.goto( another_boy);&nbsp;&nbsp; </div><div>     }<font size="3">&nbsp;&nbsp;&nbsp;&nbsp;</font></div>

totoyo 发表于 2007-9-4 17:38:00

有大有小`~保护视力~嘿嘿

梦夢﹎飘过 发表于 2007-9-4 22:18:00

<font face="幼圆" color="#33cccc" size="2">曾经学过..但已经完全不会了.还好还看的懂..</font>

拉面专家 发表于 2007-9-19 16:36:00

呵呵,都忘光了

刹那公子 发表于 2007-9-19 17:46:00

可怜的C
页: [1]
查看完整版本: 仅献给学过C语言的朋友们