主题:acen朋友在吗?
上次的那道题有两句话我不太明白请指教:1、 fillchar(arr,sizeof(arr),0);
2、 inc(arr[ord(str[i])-48]);
var
str:string;
arr:array[0..9] of byte;
i:integer;
begin
write('Enter the digital string:');
readln(str);
fillchar(arr,sizeof(arr),0);
for i:=1 to length(str) do
inc(arr[ord(str[i])-48]);
for i:=0 to 9 do
write(i,':',arr[i],' ':2);
readln;
end.
还能请你帮解这道题吗?先谢谢了,
1、输入两个串A和B,判断B是否是A的子串。是就‘yes’,否就‘no’
2、 inc(arr[ord(str[i])-48]);
var
str:string;
arr:array[0..9] of byte;
i:integer;
begin
write('Enter the digital string:');
readln(str);
fillchar(arr,sizeof(arr),0);
for i:=1 to length(str) do
inc(arr[ord(str[i])-48]);
for i:=0 to 9 do
write(i,':',arr[i],' ':2);
readln;
end.
还能请你帮解这道题吗?先谢谢了,
1、输入两个串A和B,判断B是否是A的子串。是就‘yes’,否就‘no’