统计单词个数 pascal代码
来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/09/20 09:05:13
统计单词个数 pascal代码
告诉
样例输入 Sample Input
Hello everybody!Vivian Snow is the greatest alive.
样例输出 Sample Output
8
时间限制 Time Limitation
1s
请无视Sample Input
告诉
样例输入 Sample Input
Hello everybody!Vivian Snow is the greatest alive.
样例输出 Sample Output
8
时间限制 Time Limitation
1s
请无视Sample Input
var s:string;
i,j,t:integer;
begin
readln(s);
for i:=1 to length(s) do
if (s[i]<'A')and(s[i]>'Z')and(s[i]<'a')and(s[i]>'z')
and(s[i]<>' ') then s[i]:=' ';
j:=pos(' ',s);
while j>0 do begin
if s[j+1]=' ' then while s[j+1]=' ' do delete(s,j+1,1);
j:=pos(' ',copy(s,j+1,255));
end;
j:=1;
for i:=1 to length(s) do
if s[i]=' ' then inc(j);
writeln(j);
end.
i,j,t:integer;
begin
readln(s);
for i:=1 to length(s) do
if (s[i]<'A')and(s[i]>'Z')and(s[i]<'a')and(s[i]>'z')
and(s[i]<>' ') then s[i]:=' ';
j:=pos(' ',s);
while j>0 do begin
if s[j+1]=' ' then while s[j+1]=' ' do delete(s,j+1,1);
j:=pos(' ',copy(s,j+1,255));
end;
j:=1;
for i:=1 to length(s) do
if s[i]=' ' then inc(j);
writeln(j);
end.
统计单词个数 pascal代码
pascal 统计单词个数
Pascal问题:统计单词
pascal 单词统计
pascal统计大写英文字母的个数
pascal单词统计Description 输入一串英文句子,统计该英文句子中英文单词的个数,并将单词个数输出.Inpu
用PASCAL做!读入一英文句子,单词之间用空格或逗号隔开,统计其中单词个数,并输出各个字母出现的频率.
pascal,从n个数中选择m个数,输出每一种组合,并统计总的个数
统计 用free pascal
pascal:数据统计
Pascal输入20个整数,统计其中正数、负数和零的个数
用pascal编写程序 输入十个整数,统计大于0的数的个数.