恭喜,你发布的帖子
发布于 2021-05-23 11:29:02
2楼
1、定义数组保存你要查找的数据
2、定义结果保存区数组,保存数值以及个数
结果数组初始值都是0,数组已保存数据个数count为1
for i:=1 to max
for j:=i to max
if data[i]:=data[j] then
for k:=1 to count
if data[i]<>result_data[count] then
count:=count+1;
end_if;
end_for;
result_data[count]:=data[i];
result_count[count]:=result_count[count]+1;
end_if;
end_for;
end_for;
请填写推广理由:
分享
只看
楼主