| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1281 人关注过本帖
标题:[求助]救救小妹吧。。不会做的 c语言题。。>o
只看楼主 加入收藏
nicole
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2006-8-29
收藏
 问题点数:0 回复次数:14 
[求助]救救小妹吧。。不会做的 c语言题。。>o
dogxbxxxnoon
bhellotherec
akciuqbrownm
xxxgexlahjij
xbzoxvuxxxox
xlxdzxexxxjx
xuxxblxnkgod

大家都有看过报章杂志上这类 word puzzle 的游戏。。(就找英文单字啊,打横打直,斜上或斜下的..)
小妹我的作业呢就是要用 c语言, 从以上的字母中找到

hello
dog
brown
join
row
quick
averyverylongword
noon
z
blue
blunt
help
even
blink

还要把那些字都自动用颜色 highlight 起来, 和显示结果,

The word "hello" was found 1 time in the grid.
The word "dog" was found 3 times in the grid.
The word "brown" was found 1 time in the grid.
The word "join" was found 1 time in the grid.
The word "row" was found 1 time in the grid.
The word "quick" was found 1 time in the grid.
The word "averyverylongword" was NOT found in the grid.
The word "noon" was found 2 times in the grid.
The word "z" was found 2 times in the grid.
The word "blue" was found 2 times in the grid.
The word "blunt" was NOT found in the grid.
The word "help" was NOT found in the grid.
The word "even" was found 1 time in the grid.
The word "blink" was NOT found in the grid.


过几天就要交了,但我还是完全不董要怎么做啊。。
那位哥哥或姐姐可以救救我啊。。!!?
拜托拉。。 >,<
我的e-mail, iam_nicole87@yahoo.com
搜索更多相关主题的帖子: c语言 小妹 
2006-08-29 15:36
JerryChen
Rank: 1
等 级:新手上路
帖 子:46
专家分:0
注 册:2006-8-14
收藏
得分:0 
小姑娘,你学的是什么专业?怎么会有这么难得题?
2006-08-29 17:25
ww84020209
Rank: 1
等 级:新手上路
帖 子:190
专家分:0
注 册:2006-8-21
收藏
得分:0 
题不难,关键怎样才能判断是一个单词呢?

2006-08-29 17:59
cwande
Rank: 2
等 级:新手上路
威 望:3
帖 子:333
专家分:0
注 册:2006-8-18
收藏
得分:0 

暴力穷举肯定能出答案(虽然很慢).................


汗,都懒得写代码了.......... cheat了一个威望,哈.....
2006-08-29 18:28
nicole
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2006-8-29
收藏
得分:0 
我选读工程师了啦。。
谁知道有那么难得东西啊。。 ToT

我数学和科学都很好丫。。
就天生电脑白痴。。 >.<

各位哥哥一定要救救我丫。。


2006-08-29 19:19
魔幻星空
Rank: 1
等 级:新手上路
帖 子:149
专家分:0
注 册:2006-8-24
收藏
得分:0 

很难的题啊
我可没做过这么难的
考虑一下先


2006-08-29 20:51
mp3aaa
Rank: 5Rank: 5
等 级:贵宾
威 望:17
帖 子:2013
专家分:8
注 册:2006-2-15
收藏
得分:0 
你提供的dogxbxxxnoon
bhellotherec
akciuqbrownm
xxxgexlahjij
xbzoxvuxxxox
xlxdzxexxxjx
xuxxblxnkgod
里面 没有
averyverylongword 这个啊?

羊肉串 葡萄干 哈密瓜!!
2006-08-29 21:07
jxry8888
Rank: 1
等 级:新手上路
帖 子:97
专家分:0
注 册:2006-8-13
收藏
得分:0 
以下是引用nicole在2006-8-29 15:36:26的发言:
dogxbxxxnoon
bhellotherec
akciuqbrownm
xxxgexlahjij
xbzoxvuxxxox
xlxdzxexxxjx
xuxxblxnkgod

大家都有看过报章杂志上这类 word puzzle 的游戏。。(就找英文单字啊,打横打直,斜上或斜下的..)
小妹我的作业呢就是要用 c语言, 从以上的字母中找到

hello
dog
brown
join
row
quick
averyverylongword
noon
z
blue
blunt
help
even
blink

还要把那些字都自动用颜色 highlight 起来, 和显示结果,

The word "hello" was found 1 time in the grid.
The word "dog" was found 3 times in the grid.
The word "brown" was found 1 time in the grid.
The word "join" was found 1 time in the grid.
The word "row" was found 1 time in the grid.
The word "quick" was found 1 time in the grid.
The word "averyverylongword" was NOT found in the grid.
The word "noon" was found 2 times in the grid.
The word "z" was found 2 times in the grid.
The word "blue" was found 2 times in the grid.
The word "blunt" was NOT found in the grid.
The word "help" was NOT found in the grid.
The word "even" was found 1 time in the grid.
The word "blink" was NOT found in the grid.


过几天就要交了,但我还是完全不董要怎么做啊。。
那位哥哥或姐姐可以救救我啊。。!!?
拜托拉。。 >,<
我的e-mail, iam_nicole87@yahoo.com

没有发现的没有发现了,不过 我也不会!

2006-08-29 21:21
fantasyzc
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2006-8-16
收藏
得分:0 

笨办法 大家参考
定义数组 char s[]="dogxbxxxnoonbhellotherecakciuqbrownmxxxgexlahjijxbzoxvuxxxoxxlxdzxexxxjxxuxxblxnkgod"
循环查找单词特定字母
如hello 首先查h接着往下单词结束
int a=1; 查到的不查
int k=1; 判断单词有没全找到
while(s[i]!='\0')
{

printf("%c",s[i]);
if (a)
{
if ('h'==a[i])
{
textcolor(3); 改变字颜色
cprintf(a[i]);
a=0;k++; 如果找到 a 为0 下次不找了 K++ 已找到单词+1
}
}
依次 e ,l, l, o
i++;
}
if (k!= hello的长 那么没找到;

2006-08-30 03:23
魔幻星空
Rank: 1
等 级:新手上路
帖 子:149
专家分:0
注 册:2006-8-24
收藏
得分:0 

用穷举法做了一点,太麻烦了!就做不下去了。
有哪位同行知道简单一点的算法?


2006-08-30 10:46
快速回复:[求助]救救小妹吧。。不会做的 c语言题。。>o
数据加载中...
 
   



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

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