Posted by : Erick Elfrada Sinurat Selasa, 19 Juni 2012

Program Masuk_Data_Sama;
Uses WinCrt;
Type
Larik = array [1..50] of integer;
Var
i,n,b,k : integer;
ada : boolean;
x : Larik;
Begin
clrscr;

Write('Masukkan Bilangan : ');Readln(n);
k:=1;
Repeat
Write('Masukkan Data : ');Readln(b);
ada:=False;
for i:=1 to k do
if b=x[i] then
Begin
ada:=True; i:=k;
end;
if not(ada) then
Begin
x[k]:=b; k:=k+1;
end
14
else
Writeln('Data Sudah ada...');
until k>n;
for i:=1 to n do
writeln(x[i]);
end.
Hasilnya adalah:

Leave a Reply

Subscribe to Posts | Subscribe to Comments

^^Find Me^^

^^Translate^^

^^God Enel^^

^^God Enel^^
My Favorite Anime Character

- Copyright © Elfrada.com - You'll Get it Here-|-Robotic Notes-|-Powered by Blogger -|- Designed by Erick Elfrada -