搜索
首页 电脑/网络 程序设计 其他编程语言

Delphi问题

输入1行字符,分别统计出其中英文字母、空格、数字和其他字符的个数。

全部回答

2007-05-15

0 0

    var i,shu,zimu,kongge, begin shu:=0; zimu:=0; kongge:=0; qita:=0; for i:=1 to length(edit1。
  Text) do begin key:=pchar(copy(edit1。  Text,i,1))^; if (key in ['0'。。'9']) then shu:=shu+1 else if (key in ['A'。
  。'Z','a'。。'z']) then zimu:=zimu+1 else if (key in [' ']) then kongge:=kongge+1 else qita:=qita+1; end; label1。
      Caption:=inttostr(shu); label2。caption:=inttostr(zimu); label3。Caption:=inttostr(kongge); label4。
  Caption:=inttostr(qita); end;。

类似问题换一批

热点推荐

热度TOP

相关推荐
加载中...

热点搜索 换一换

电脑/网络
其他编程语言
程序设计
电脑装机
操作系统/系统故障
硬件
笔记本电脑
百度
互联网
反病毒
软件
程序设计
其他编程语言
数据库
C/C++
VB
JAVA相关
C#/.NET
VC++
汇编语言
其他编程语言
其他编程语言
举报
举报原因(必选):
取消确定举报