program BINARY_SEARCHING;
uses wincrt;
const nmax=20;
var
data:array[1..nmax]of integer;
i,j,k,atas,bawah,tengah,n,m,posisi,temp:integer;jawab:char;
cari,pil:integer;ada:boolean;
procedure input;
begin
gotoxy(25,2);write('Binary Searching '); writeln;
gotoxy(25,3);write('______ _________ ');
writeln;
gotoxy(25,5);write('*****************');
writeln;
gotoxy(25,6);write('OMMY');
writeln;
gotoxy(25,7);write(' 04.04.111.00380 ');
writeln;
gotoxy(25,8);write('Tekn. Informatika');
writeln;
gotoxy(25,9);write(' A ');
writeln;
gotoxy(25,10);write('*****************');
writeln;
writeln;
write('enter your own data = ');readln(n);
writeln('input ', n ,' number!');
for j:=1 to n do
readln(data[j])
end;
procedure sort;
begin
for i:=2 to n do
for j:=n downto i do
if data[j]>data[j-i] then
begin
temp:=data[j];
data[j]:=data[j-1];
data[j-1]:=temp;
end;
end;
procedure biner ;
begin;
ada:=false;
atas:=n;down:=1;
while atas>=down do
begin
center:=(up+down)div 2;
if find
atas:=tengah-1
else if find>data[center] then
atas:=center+1
else
ada:=true;
down:=up+1;
end;
end;
begin
input;
urut;
write('enter code=');readln(find);
biner;
if exist=true then
writeln('data available')
else
writeln('data empty');
end.
Binary Searching Listing Program
|
Social Media Widget SM Widgets
Demo Blog NJW V2 Updated at: Wednesday, April 21, 2010
Contoh Blog - New Johny Wuss V2 Template
ABOUT
Melayani:
1.Pembuatan aplikasi web
2.File finder (jasa pencari data)
3.Konsultasi IT, Cinta, Rumahtangga, Jasmani dan Rohani
4.Kerjasama dibidang IT
sms dan email untuk pelayanan lebih cepat
no HP 08813236918 Whatsapp
Email: Nimodx@gmail.com
1.Pembuatan aplikasi web
2.File finder (jasa pencari data)
3.Konsultasi IT, Cinta, Rumahtangga, Jasmani dan Rohani
4.Kerjasama dibidang IT
sms dan email untuk pelayanan lebih cepat
no HP 08813236918 Whatsapp
Email: Nimodx@gmail.com
0 comments:
Post a Comment