Selasa, 09 Oktober 2012

Program Hitung Huruf

program hitung_huruf;
uses wincrt;

var

pita:string;
huruf : char;
listhuruf,i,cc:integer;

procedure StartKata;
begin
cc:=1;
end;

procedure AdvKata;
begin
i:=1;
for cc:=1 to length(pita) do
begin
if pita[cc] in [huruf] then
listhuruf:=listhuruf+1;
end;
end;

begin
clrscr;
write('Silahkan Masukkan Kalimat: ');
readln(pita);
StartKata;
write('Huruf Yang Ingin Dicari : ');
readln(huruf);
AdvKata;
writeln('Jumlah Hutuf Yang Dicari : ',listhuruf);
readln;
end.

0 komentar:

Posting Komentar

Related Posts Plugin for WordPress, Blogger...

 
Design by Wordpress Theme | Bloggerized by Free Blogger Templates | JCPenney Coupons