Nama : Mutia Yustifisiyah Rahmah Safira
NIM : A1C614208
program menghitunghuruf;
uses wincrt;
var
kata :string;
n :array['A'..'Z'] of byte;
i :byte;
begin
writeln('Mutia Yustifisiyah R. S. ');
writeln('A1C614208');
writeln('*****************************************');
writeln('selamat datang di program penghitung huruf');readln;
write('masukkan suatu kata= ');readln(kata);
for i:=1 to length(kata) do
n[upcase(kata[i])]:=n[upcase(kata[i])]+1;
for i:=1 to 26 do
if (n[upcase(chr(64+i))]<>0) then
writeln(upcase(chr(64+i)),' banyaknya huruf=',n[upcase(chr(64+i))]);
end.
NIM : A1C614208
program menghitunghuruf;
uses wincrt;
var
kata :string;
n :array['A'..'Z'] of byte;
i :byte;
begin
writeln('Mutia Yustifisiyah R. S. ');
writeln('A1C614208');
writeln('*****************************************');
writeln('selamat datang di program penghitung huruf');readln;
write('masukkan suatu kata= ');readln(kata);
for i:=1 to length(kata) do
n[upcase(kata[i])]:=n[upcase(kata[i])]+1;
for i:=1 to 26 do
if (n[upcase(chr(64+i))]<>0) then
writeln(upcase(chr(64+i)),' banyaknya huruf=',n[upcase(chr(64+i))]);
end.