Mata Pisau

Praktikum Pascal Hari Ini

Posted on: Oktober 3, 2007

Hari ini mei praktikum pemrograman dasar, diasisteni ma tiga asisten yang paling nggak banget se MIPA *canda nyeh nyeh nyeh*, ya itu akhire mei bener-bener di asisteni ma Mas Ndaru, gak nyeremin kok, pas masnya ngomong ajah mei gak denger, heheheh, padahal lumayan deket tuh, au deee, asisten yang atu lagi mas Kurnia, gak tahu ceritane gimana, padahal pernah bilang klo gak ngasisteni TI-A, piye to mas? wekekekek :mesem: terus masih ada satu asisten lagi, tapi mei gak tahu namanya *whoaps*

kemaren ada PR bikin program yang buat nyari akar persamaan kuadrat, yang hari ini diminta bu Umi untuk ditulis di pascal, niy program mei (bisa di compile loh! :alhamdulillah:)

Program Pencari_Akar_Persamaan_Kuadrat;
USES CRT;
VAR a,b,c,D,x1,x2:real;
Begin

clrscr;
gotoxy(20,2); write(‘Pencari Akar Persamaan Kuadrat’);
gotoxy(20,4); write(‘——————————————‘);
gotoxy(20,8); write(‘Masukkan nilai a = ‘); readln(a);
gotoxy(20,10); write(‘Masukkan nilai b = ‘); readln(b);
gotoxy(20,12); write(‘Masukkan nilai c = ‘); readln(c);
D:=sqr(b)-4*a*c;
if D<0 then

Begin

gotoxy(10,14);
write(‘Diskrimanan bernilai negatif sehingga akar-akarnya imajiner’);

End;

if D=0 then

Begin

x1:=(-b-sqrt(D))/(2*a);
gotoxy(10,14);
write(‘Diskriminan bernilai nol maka memiliki dua akar kembar yaitu ‘, x1);

End;

if D>0 then

Begin

x1:=(-b-sqrt(D))/(2*a);
x2:=(-b+sqrt(D))/(2*a);
gotoxy(5,14);
write(‘Diskriminan > nol maka memiliki dua akar persamaan kuadrat, yaitu ‘,x1,’ dan ‘,x2);

end;

readln;

End.

udah deee jadi, tapi karena sebenere ma bu Umi belon diajarin if … then, ya jadine malah agak gak enak ma bu Umi, mei baca buku kok Bu ….

1 Response to "Praktikum Pascal Hari Ini"

Wakaka ningetin waktu itu deh
Emang kerjaannya pake dikumpulin di blog yah :)

#ya nggak seee
buat catetan ajah, biar gak ilang,

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

Sekedar Pikiran

one of my friends used to say "there is an evil side in everyone's life", but for me, i think, i had more than one, i had some evil side inside me. The evil that doing this, one evil that doing those, one more that was here, and some more was there ...
sometimes i get confuse with what I've did, confuse whether it was right or wrong, whether it was necessary or not, or things like that ...
I'm still a little child, hasn't growing up but getting younger ...

my-plurk

Banners

 blogger solo solo gitu what ...!!!


SLC


Bengawan, Komunitas Blogger Solo

Top Clicks

  • Tak ada

Blog Stats

  • 41,507 visitors

Supported by


WordPress
%d blogger menyukai ini: