Minggu, 17 Januari 2010

Source Code Program Bagi dua

Program Metode_Bagi_Dua;
uses crt;
label e;
var a,b,T,fa,fb,Ft,eps,z:real; c,d:longint;
begin clrscr;
c:=0;a:=0.1; b:=1;
writeln('Mencari akar dari persamaan f(x)=exp(x)-(4*x)');
write('masukkan nilai epsilon! '); readln(eps);writeln;
writeln('Tekan Enter Untuk Memulai Iterasi');
e: begin;readln;inc(c);
writeln('Iterasi ke-',c);
T :=(a+b)/2;
fa:=exp(a)-4*a;fb:=exp(b)-4*b;fT:=exp(T)-4*T;
if fa*fT<0 a =" ',a:13:13);write('" b =" ',b:13:13);write('" galat =" ',abs(b-a):14:13,'" t =" ',T:13:13);write('">eps then goto e else
begin writeln;writeln;readln;
writeln('karena galat < t =" ',T:13:13);" x =" ',T:13:13);">

0 comments:

Posting Komentar

Twitter Delicious Facebook Digg Stumbleupon Favorites More

Enter your email address to subscribe:

Delivered by FeedBurner

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | SharePoint Demo