program ARIEZ_IRWANTO;
uses crt;
var
x1,x2,y1,y2,x,y:real;
f,g,h:string;
begin
textcolor(20);
clrscr;
writeln(' ');
writeln(' INTERPOLASI LINEAR (2 TITIK) ');
writeln(' ');
writeln(' Diketahui tabel laju kdran dan henti kendraan =40 ');
writeln(' ______________________________________________________ ');
writeln(' ||LAJU_KENDARAAN (KM/JAM)= ||HENTI KENDARAAN(FEET)=Y || ');
writeln(' ||_________________________ ||________________________|| ');
writeln(' || 15 || 15 || ');
writeln(' || 20 || 20 || ');
writeln(' || 35 || 50 ||__p1 ');
writeln(' || 40 || 70 || ');
writeln(' || 60 <== || 7.5 <=== || ');
writeln(' || 65 || 80 ||__p2 ');
writeln(' || 70 || 100 || ');
writeln(' || 75 || 155 || ');
writeln(' || || || ');
writeln(' ||_____________________________||________________________|| ');
WRITELN('Berapa jarak henti_kendaran dan laju_kendaraan 60 km/jam ? ');
writeln('JAWAB : ');
writeln('p1 dan p2 :(x1,y1) dan (x2,y2) ');
writeln('jarak henti untuk kecepatan 60 km/jam maka titik p1=(40,70) ');
writeln('titik p2=(65,80)');
writeln('x1=40 x2=70 ');
writeln('y1=65 y2=80 ');
writeln('x =60 y= ...... ');
writeln('==========================================================');
writeln('Y=(y2-y1)/(x2-x1)*(x-x1)+y1 ');
writeln('Y=(91-85)/(70-60)*(65-60)+85 ');
writeln('==========================================================');
write('input nilai x1 = '); readln(x1);
writeln('==========================================================');
write('input nilai y1 = '); readln(y1);
writeln('==========================================================');
write('input nilai x2 = '); readln(x2);
writeln('==========================================================');
write('input nilai y2 = '); readln(y2);
writeln('==========================================================');
write('input nilai x = '); readln(x);
Y:=(y2-y1)/(x2-x1)*(x-x1)+y1;
writeln;
write('( NILAI Y DIPERKIRAKAN ) ',y:2:1);
writeln;
writeln;
writeln(' **************TERIMA_KASIH**************/04/01/2012 ' );
writeln;
writeln('============================< by_ARIEZ_IRWANTO >========================');
readkey;
end.
Terbaru dan Populer
Tidak ada komentar:
Posting Komentar