jeannotlafart
Hero
Program Tansuat;
Uses crt;
var i,k,j,n:integer;
dem,A: array [1..100] of integer;
begin
clrscr;
write('Nhap so pt:');readln(n);
for i:=1 to n do
readln(A);
for i:=1 to 10 do
begin
dem[i-1]:=0;
for j:= 1 to n do
if A=A[j] then inc(dem[i-1]);
end
for i:=1 to 10 do writeln('So lan xuat hien so ', i-1, 'la: ', dem[i-1]);
readln;
end.
Cái này đã sửa nhé!
Uses crt;
var i,k,j,n:integer;
dem,A: array [1..100] of integer;
begin
clrscr;
write('Nhap so pt:');readln(n);
for i:=1 to n do
readln(A);
for i:=1 to 10 do
begin
dem[i-1]:=0;
for j:= 1 to n do
if A=A[j] then inc(dem[i-1]);
end
for i:=1 to 10 do writeln('So lan xuat hien so ', i-1, 'la: ', dem[i-1]);
readln;
end.
Cái này đã sửa nhé!