返回   cpper编程论坛 > Zion/测试
注册账号 论坛帮助 会员列表 日历事件 搜索 今日新帖 标记版面已读

Zion/测试 惹人烦的东西这边来

回复
 
LinkBack 主题工具 显示模式
  #1 (permalink)  
旧 2004-09-28
初级会员
 
注册日期: 2004-09-22
帖子: 1
kenshin 正向着好的方向发展
默认 C++问题

Occasionally users input numbers by mistakes for fields that have only characters such as name. A good program must be able to parse through the characters inputted by the user to eliminate the numbers.

Using pointers, write a program that returns a numberless word from a mixed word of letters and numbers.

For example:
David123 will return a David
David123Beckham will return a David Beckham
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
回复时引用此帖
  #2 (permalink)  
旧 2004-09-28
polyrandom 的头像
超级版主
 
注册日期: 2002-09-03
帖子: 3,135
文章: 20
polyrandom 正向着好的方向发展
默认

1.请使用有意义的标题
2.请给出自己思考的过程
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
回复时引用此帖
  #3 (permalink)  
旧 2004-09-28
高级会员
 
注册日期: 2003-11-04
帖子: 210
pomb 正向着好的方向发展
发送 MSN 消息给 pomb
默认

What do you want? Is there any relationship between your question and C++? Do you think some guy will give out a full program for you? You've expected too much!

I think this question will soon be seen in the Zion.
Over.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
回复时引用此帖
  #4 (permalink)  
旧 2004-09-28
高级会员
 
注册日期: 2003-11-04
帖子: 210
pomb 正向着好的方向发展
发送 MSN 消息给 pomb
默认

Pora's dexterity is higher than mine.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
回复时引用此帖
  #5 (permalink)  
旧 2004-10-10
cleni 的头像
初级会员
 
注册日期: 2004-09-16
帖子: 17
cleni 正向着好的方向发展
发送 ICQ 消息给 cleni
默认 在混合字符串中,剔除数字,这是很基本的问题

在混合字符串中,剔除数字,这是很基本的问题,但好像是2003年职称考试考过,当时要求用c
#include<iostream.h>

#define N 80
short check_char(char *);
short judge(char *);
short seek_replace(char *);
void main(){
char s[N];
short flag=0;
cout<<"\n\nInput a string please:\t";
cin>>s;
flag=check_char;
}

short judge(char *a){
short l,j;
j=(short)*a;
l=((j>=65&&j<=90)||(j>=97&&j<=122));
return l;
}

short check_char(char *t){
short n=0;
char *p[N];
for(;n<N;t++){
if(judge){p[n]=t;n++;}
if (*t=='\0') break;
}
cout<<"Number of the char is:\t"<<n<<endl;
cout<<"The new string is:\t";
for(short k=0;k<n;k++) cout<<*p[k];
cout<<endl;
return n;
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
回复时引用此帖
回复

书签
主题工具
显示模式

发帖规则
不可以发表新主题
不可以发表回复
不可以上传附件
不可以编辑自己的帖子

启用 BB 代码
论坛启用 表情符号
论坛启用 [IMG] 代码
论坛禁用 HTML 代码
Trackbacks are 启用
Pingbacks are 启用
Refbacks are 启用


相似的主题
主题 主题作者 版面 回复 最后发表
[转载]发生在我身上的一段真实经历,没看完不要发表意见,谢谢 cpper 灌水/杂烩/BT 1 2006-03-10 08:09 PM
某人对《Computer Networks》一书的书评(原贴名:好BT的家伙~~~ cat 技术杂烩 6 2004-10-19 06:01 PM
[转贴]不确定性算法在C++中的表达:一个简化模型 Elminster C/CPP/TMP/GP 1 2004-07-14 01:19 PM
提问的智慧(请没看过的同学看一下) polyrandom 技术杂烩 11 2004-04-20 12:18 AM
[转载]发生在我身上的一段真实经历,没看完不要发表意见,谢谢 polyrandom 技术杂烩 0 2002-09-24 11:48 AM


所有时间均为格林尼治时间 +9。现在的时间是 02:10 AM


Powered by vBulletin® 版本 3.7.0
版权所有 ©2000 - 2008,Jelsoft Enterprises Ltd.
(C) Copy Right All Right Reserved 2001 - 2007

Search Engine Friendly URLs by vBSEO 3.1.0