佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 1506|回复: 15

编程接龙游戏

[复制链接]
发表于 27-10-2007 07:30 PM | 显示全部楼层 |阅读模式
跟大家玩个编程接龙游戏。。。

我会开始一段代码。。。
接下去的人可以任加一段代码进去。。。条件是必须compilable..
如果不compilable,就当无效

看看这个代码最后变成什么模样。。。


  1. int main(int argc, char *argv[])
  2. {

  3.   return 0;
  4. }
复制代码

[ 本帖最后由 tensaix2j 于 27-10-2007 08:10 PM 编辑 ]
回复

使用道具 举报


ADVERTISEMENT

发表于 27-10-2007 08:07 PM | 显示全部楼层
printf("Hello world " );
回复

使用道具 举报

 楼主| 发表于 27-10-2007 08:12 PM | 显示全部楼层
int main(int argc, char *argv[])
{
   printf("Hello world " );
  
   puts("\nPlease copy down the whole code snippet. Thanks");
   
   return 0;
}
回复

使用道具 举报

发表于 29-10-2007 04:35 PM | 显示全部楼层
int main(int argc, char *argv[])
{
   throw(-1);

   printf("Hello world " );
  
   puts("\nPlease copy down the whole code snippet. Thanks");
   
   return 0;
}
回复

使用道具 举报

 楼主| 发表于 29-10-2007 05:42 PM | 显示全部楼层
int main(int argc, char *argv[])
{
   if (0) throw(-1);

   printf("Hello world " );
  
   puts("\nPlease copy down the whole code snippet. Thanks");
   
   return 0;
}
回复

使用道具 举报

发表于 30-10-2007 01:36 AM | 显示全部楼层
int main(int argc, char *argv[])
{
if(0)
{
   if (0) throw(-1);

   printf("Hello world " );
  
   puts("\nPlease copy down the whole code snippet. Thanks");
   }
else
{
   return 0;
}
}
回复

使用道具 举报

Follow Us
发表于 30-10-2007 09:26 AM | 显示全部楼层
int main(int argc, char *argv[])
{
if(0)
{
   if (0) throw(-1);

   printf("Hello world " );
  
   puts("\nPlease copy down the whole code snippet. Thanks");
   }
else
{
   printf("送你一个鸭蛋 :P");
   return 0;
}
}
回复

使用道具 举报

 楼主| 发表于 2-11-2007 09:45 PM | 显示全部楼层
===
/* HUMAN_DNA.H
*
* Human Genome
* Version 2.1
*
* (C) God
*/

/* Revision history:
*
* 0000-00-01 00:00  1.0  Adam.
* 0000-00-02 10:00  1.1  Eve.
* 0000-00-03 02:11  1.2  Added penis code to male version. A bit messy --
*                        will require a rewrite later on to make it neater.
* 0017-03-12 03:14  1.3  Added extra sex drive to male.h; took code from
*                        elephant-dna.c
* 0145-10-03 16:33  1.4  Removed tail.
* 1115-00-31 17:20  1.5  Shortened forearms, expanded brain case.
* 2091-08-20 13:56  1.6  Opposable thumbs added to hand() routine.
* 2501-04-09 14:04  1.7  Minor cosmetic improvements -- skin colour made
*                        darker to match my own image.
* 2909-07-12 02:21  1.8  Dentition inadequate; added extra 'wisdom' teeth.
*                        Must remember to make mouth bigger to compensate.
* 4501-12-31 14:18  1.9  Increase average height.
* 5533-02-12 17:09  2.0  Added gay option, triggered by high population
*                        density, to try and slow the overpopulation problem.
* 6004-11-04 16:11  2.1  Made forefinger narrower to fit hole in centre of
*                        CD.
*/

/* Standard definitions
*/

#define SEX male
#define HEIGHT 1.84
#define MASS 68
#define RACE caucasian

/* Include inherited traits from parent DNA files.
*
* Files must be pre-processed with MENDEL program to provide proper
* inheritance features.
*/

#include "mother.h"
#include "father.h"

#infndef FATHER
#warn("Father unknown -- guessing\n"
#include "bastard.h"
#endif

/* Set up sex-specific functions and variables
*/
#include <sex.h>

/* Kludged code -- I'll re-design this lot and re-write it as a proper
* library sometime soon.
*/
struct genitals
   {
#ifdef MALE
   Penis *jt;
#endif
   /* G_spot *g;   Removed for debugging purposes */
#ifdef FEMALE
   Vagina *p;
#endif
   }

/* Initialization bootstrap routine -- called before DNA duplication.
* Allocates buffers and sets up protein file pointers
*/
DNA *zygote_initialize(Sperm *, Ovum *);

/* MAIN INITIALIZATION CODE
*
* Returns structures containing pre-processed phenotypes for the organism
* to display at birth.
*
* Will be improved later to make output less ugly.
*/
Characteristic *lookup_phenotype(Identifier *i);



/*
int main(int argc, char *argv[])
{
if(0)
{
   if (0) throw(-1);

   printf("Hello world " );
  
   puts("\nPlease copy down the whole code snippet. Thanks";
   }
else
{
   printf("送你一个鸭蛋 ";
   return 0;
}
}
*/

main(){}
回复

使用道具 举报


ADVERTISEMENT

 楼主| 发表于 8-11-2007 10:21 AM | 显示全部楼层
为何反应那么冷。。。。是不是因为用C所以大家不喜欢。。
回复

使用道具 举报

发表于 9-11-2007 08:24 AM | 显示全部楼层
我都不会C


回复

使用道具 举报

 楼主| 发表于 9-11-2007 11:40 AM | 显示全部楼层
那用vb好了。

其实,我是想,

如果可以的话,大家来做一个软件。。简单也好,复杂也好。。
回复

使用道具 举报

发表于 9-11-2007 01:11 PM | 显示全部楼层
这个我们尝试过,最后胎死腹中

不然,这次由你做庄吧。。。。
回复

使用道具 举报

发表于 11-11-2007 12:47 AM | 显示全部楼层
用C++也可以
回复

使用道具 举报

发表于 11-11-2007 02:05 PM | 显示全部楼层
原帖由 tensaix2j 于 9-11-2007 11:40 AM 发表
那用vb好了。

其实,我是想,

如果可以的话,大家来做一个软件。。简单也好,复杂也好。。


不如写class或function跟好
回复

使用道具 举报

 楼主| 发表于 11-11-2007 02:21 PM | 显示全部楼层
原帖由 小陈陈 于 11-11-2007 02:05 PM 发表


不如写class或function跟好


我都没阻止你们爱怎么写就怎么写,都讲是接龙了。。

喜欢的话,写ascii art 也可以。
回复

使用道具 举报

发表于 18-11-2007 02:35 PM | 显示全部楼层
没有方向也不好接啊。。。
回复

使用道具 举报


ADVERTISEMENT

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 24-9-2025 07:34 AM , Processed in 0.188638 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表