Program Vocal_Linier;
uses crt;
var
nama:array[1..10] of string[1];
nm:string;
a,x:byte;
begin
clrscr;
write('Masukkan Nama : ');readln(nm);
for x:=1 to length(nm) do
nama[x]:=copy(nm,x,1);
a:=0;
for x:=1 to length(nm) do
begin
if ((nama[x]='a') or (nama[x]='A') or
(nama[x]='i') or (nama[x]='I') or
(nama[x]='u') or (nama[x]='U') or
(nama[x]='e') or (nama[x]='E') or
(nama[x]='o') or (nama[x]='O') ) then
begin
a:=a+1;
writeln('Keterangan : ',nama[x],' ada di posisi ke- ',x)
end;end;
if a=0 then
writeln('Keterangan : Character vocal tidak ada');
readln;
end.
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar