Program Konsonan_Linier;
uses crt;
var
nama:array[1..10] of string[1];
nm:string;
x,c:byte;
begin
clrscr;
write('Masukkan Nama : ');readln(nm);
for x:=1 to length(nm) do
nama[x]:=copy(nm,x,1);
write('Keterangan : ');
c:=0;
for x:=1 to length(nm) do
begin
if not ((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
c:=c+1;
gotoxy(20,4+C);writeln(nama[x],' ada diposisi ke- ',x);
end;end;
if c=0 then
writeln('Character Konsonan tidak ada');
readln;
end.
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar