Delphi问题
输入1行字符,分别统计出其中英文字母、空格、数字和其他字符的个数。
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;。
答:#include int main(void) { //输入一行字符,分别统计出其中英文字母、空格、数字和其他字符的个数。 char ch; int char_...详情>>
答:的意思是找不到指定的文件,你确定你的文件路径正确吗? 另外,调用的部分你用 n(shcmd)试试详情>>