| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 985 人关注过本帖
标题:一个测试程序,测测你得几分。。。。
只看楼主 加入收藏
海蓝啸
Rank: 5Rank: 5
来 自:安徽
等 级:贵宾
威 望:17
帖 子:1611
专家分:0
注 册:2006-4-3
收藏
得分:0 
[原创]我把我写的源程序帖上来。。。
main()
{int i=0,n,one=0,two=0,three=0,four=0,five=0,six=0,seven=0,eight=0,nine=0;
char m;
printf("\n\nThis is a test of your Intelligence....please answer the questions below:\nIt's said that Bill Gates has got only 3 points...");
printf("There are 9 questions in all....\n");
printf("question 1: Does July 1st exist in England ?\npress y for yes and press n for no..\n");
scanf("%c",&m);
if(m=='y')
{
i++;
one++;
}
printf("question 2: How many birthdaies does a person have in all his life ?\njust input the number..\n");
scanf("%d",&n);
if(n==1)
{
i++;
two++;
}
printf("question 3: It is known to all that a month may have 31 days and 30 days,\nso how many months have 28 days in one year ?\n");
scanf("%d",&n);
if(n==12)
{
i++;
three++;
}
printf("question 4: How many people will attend in each Baseball match ?\n");
scanf("%d",&n);
if(n==6){
i++;
four++;
}
printf("question 5: You have a dozen of 3 yuan stamps, how many stamps do you have ?\n");
scanf("%d",&n);
if(n==12)
{
i++;
five++;
}
printf("question 6: 30 divides 1/2 and then adds on 10,what is the result ?\n");
scanf("%d",&n);
if(n==70){
i++;
six++;
}
printf("question 7: There are 3 apples on the table and you pick 2 of them , how many\napples do you have ?\n");
scanf("%d",&n);
if(n==2){
i++;
seven++;
}
printf("question 8: The doctor gave you 3 grain of pills,and told you have\n one each 30 minutes,how long will you take to eat all these 3 grain of pills ?\nTake the minute as the unit\n");
scanf("%d",&n);
if(n==60)
{
i++;
eight++;
}
printf("question 9: A farmer has 17 sheep,all sheep died of illness except 9 sheep,\nhow many sheep do the farmer also have ?\n");
scanf("%d",&n);
if(n==9)
{
i++;
nine++;
}
printf("\n\n***The test is end and your score is %d points***\n\n",i);
printf("according to your score,the result of your test is:\n\n");
if(i<=1)
printf("******I don't know what should be said to discribe you Intelligence...******\n");
if(i>=2&&i<=4)
printf("******you have the Intelligence of Bill Gates....******\n");
if(i>=5&&i<7)
printf("******Your Intelligence is very normal....******\n");
if(i==7)
printf("******Your performance is very good,must be a outstanding student in your school******\n");
if(i>7)
printf("******ohhhhhhhhhh,you can go to the microsoft company to work, \nit's said that only 3 persons can get this point in a hundred people\n..Congratulations...******\n");
if(i!=9)
{printf("\n\npress space to see the right answers for the questions you answered wrongly...\n");
getch();
printf("\n\n***The following lists are your wrong answers and I give the right answers\n as follows***\n\n");
if(one==0)printf("question 1:THE RIGHT ANSWER IS :YES..BECAUSE EVERY COUNTRY HAS JULY 1ST........\n\n");
if(two==0)printf("question 2:THE RIGHT ANSWER IS :1...EVERYONE HAS ONLY ONE BIRHTDAY....\n\n");
if(three==0)printf("question 3:THE RIGHT ANSWER IS :12...EVERY MONTH HAS 28 DAYS....\n\n");
if(four==0)printf("question 4:THE RIGHT ANSWER IS :6...\n\n");
if(five==0)printf("question 5:THE RIGHT ANSWER IS :12...A DOZEN REPLACES 12...\n\n");
if(six==0)printf("question 6:THE RIGHT ANSWER IS :70...30 DIVIDES 1/2 NOT 2...\n\n");
if(seven==0)printf("question 7:THE RIGHT ANSWER IS :2...YOU PICK 2 OF THE APPLES SO YOU HAVE TWO..\n\n");
if(eight==0)printf("question 8:THE RIGHT ANSWER IS :60...WHEN YOU TAKE THE FIRST PILL YOU SHOULD NOT WAIT..\n\n");
if(nine==0)printf("question 9:THE RIGHT ANSWER IS :9...SIMPLE QUESTION...THINK IT AGAIN...\n\n");
}
printf("\nWRITEN BY *HAILANXIAO* QQ:4852150\n");
getch();
}


这是我的这个测试程序的整个源程序,很简单,没有什么复杂的算法,只是打进去的字比较多而已。。。。
请大家看看我这个程序还有什么地方可以优化的,或者让其编译后执行更快一点。。。。

这个社会太复杂。。。
2006-04-10 12:15
almashen
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2006-4-9
收藏
得分:0 
我对了5题好象

2006-04-10 12:49
海蓝啸
Rank: 5Rank: 5
来 自:安徽
等 级:贵宾
威 望:17
帖 子:1611
专家分:0
注 册:2006-4-3
收藏
得分:0 

5题不错了,呵呵, 我也对5题。。。。。。。。。。。


这个社会太复杂。。。
2006-04-10 13:04
疯狂VC
Rank: 1
等 级:新手上路
威 望:1
帖 子:375
专家分:0
注 册:2006-3-29
收藏
得分:0 
不错啊
可是我对的就少了点了
原因是b ,我的英语很烂

呵呵!

2006-04-10 16:05
andyss
Rank: 1
等 级:新手上路
帖 子:189
专家分:0
注 册:2006-4-8
收藏
得分:0 
还可以嘛,这个!

幽幽黄桷兰----建四狼
2006-04-10 21:44
海蓝啸
Rank: 5Rank: 5
来 自:安徽
等 级:贵宾
威 望:17
帖 子:1611
专家分:0
注 册:2006-4-3
收藏
得分:0 
呵呵,谢谢哦

这个社会太复杂。。。
2006-04-11 00:13
快速回复:一个测试程序,测测你得几分。。。。
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016575 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved