Senin, 18 Januari 2010

Source Code Hitung Vokal di Pascal

program bbb;
uses crt;
var i,vokal,konsonan,spasi:integer;
kata:string;
begin
clrscr;
write('masukkan Kata:');readln(kata);
for i:=1 to length(kata) do
begin
case kata[i] of
'a','i','u','e','o':vokal:=vokal+1;
' ' :spasi:=spasi+1;
else
konsonan:=konsonan+1;
end;
end;
writeln('nilai Vokal:',vokal);
writeln('nilai Konsonan:',konsonan);
writeln('nilai spasi:',spasi);
readln;
end.

0 comments:

Posting Komentar

Twitter Delicious Facebook Digg Stumbleupon Favorites More

Enter your email address to subscribe:

Delivered by FeedBurner

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | SharePoint Demo