MENENTUKAN_BILANGAN_PHYTAGORAS


PROGRAM MENENTUKAN_BILANGAN_PHYTAGORAS;

Uses Crt;

Var
a,b,c:Real;

Begin
Clrscr;
Writeln (' MENENTUKAN BILANGAN PHYTAGORAS ');
Writeln (' OLEH : Dian ALiza Pratidina_070804_IV B ');
Writeln;

Write ('Masukan a: ');
Readln (a);
writeln;
Write ('Masukan b: ');
Readln (b);

c:= sqrt ((a*a)+(b*b));
Writeln;

Writeln ('Sehingga Nilai c adalah : ',c:2:2);
Writeln;

If a>0 Then
begin
Writeln;
Writeln ('a MERUPAKAN BILANGAN ASLI');
end else if a<0 Then
begin
Writeln ('a BUKAN MERUPAKAN BILANGAN ASLI');
end;
Writeln;
if b>0 Then
begin
Writeln ('b MERUPAKAN BILANGAN ASLI');
end else if b<0 Then
begin
Writeln ('b BUKAN MERUPAKAN BILANGAN ASLI');
end;
Writeln;
if c>0 Then
begin
Writeln ('c MERUPAKAN BILANGAN ASLI');
end else if c<0 Then
begin
Writeln ('c BUKAN MERUPAKAN BILANGAN ASLI');
end;

Writeln;
WriteLn ('Terima Kasih Sudah Menggunakan Program ini');

READLN;

END.


Read Users' Comments ( 0 )

mencari Luas Segitiga



Program menghitung_luas_segitiga;

uses crt;

var
a,b,c:integer;
s,luas:real;

begin
clrscr;
writeln (' INI ADALAH PROGRAM MENGHITUNG LUAS SEGITIGA ');
writeln (' Oleh Dian Aliza Pratidina 070804 IV B ');
writeln;
write (' masukkan a : '); readln (a);
write (' masukkan b : '); readln (b);
write (' masukkan c : '); readln (c);

s:=(a+b+c)/2;
writeln;
writeln (' didapat nilai s adalah= ',s:2:2);

luas:=sqrt(s*(s-a)*(s-b)*(s-c));
writeln;
writeln (' sehingga luas segitiga adalah= ' , luas:2:2);
writeln ;
writeln (' terima kasih sudah menggunakan program ini');
readln;
end.


Read Users' Comments ( 0 )


PROGRAM Menentukan_Koordinat_Pusat_dan_Jarijari_Lingkaran_dari_3_Buah_Titik;

Uses Crt;

Var x1,y1,x2,y2,x3,y3:Real;
k2,k3,h2,h3,Xo,Yo,r:Real;

Begin
Clrscr;

Write ('MENENTUKAN KOORDINAT PUSAT&JARI-JARI LINGKARAN DARI TIGA BUAH TITIK');
Write (' OLEH DIAN ALIZA P. 070804 (4B) ');
Writeln;
writeln;

Write ('Masukan x1 : ');Readln (x1);
Write ('Masukan y1 : ');Readln (y1);
Write ('Masukan x2 : ');Readln (x2);
Write ('Masukan y2 : ');Readln (y2);
Write ('Masukan x3 : ');Readln (x3);
Write ('Masukan y3 : ');Readln (y3);
Writeln;

k2:=(-1*((x2-x1)/(y2-y1)));
k3:=(-1*((x3-x1)/(y3-y1)));
Writeln ('NILAI k2 ADALAH : ',k2:2:2);
Writeln ('NILAI k3 ADALAH : ',k3:2:2);
Write;

h2:=((y1+y2)/(2))+(((x2*x2)-(x1*x1))/((2)*(y2-y1)));
h3:=((y1+y3)/(2))+(((x3*x3)-(x1*x1))/((2)*(y3-y1)));
Writeln ('NILAI h2 ADALAH : ',h2:2:2);
Writeln ('NILAI h3 ADALAH : ',h3:2:2);
Write;

Xo:=((h3-h2)/(k2-k3));
Yo:=((k3*h3-k2*h2)/(k2-k3));

r:= sqrt ((x1-Xo)*(x1-Xo)+(y1-Yo)*(y1-Yo));
Writeln ('NILAI Xo ADALAH : ',Xo:2:2);
Writeln ('NILAI Yo ADALAH : ',Yo:2:2);
Write;

Writeln ('NILAI r ADALAH : ', r:2:2);
Writeln;

Writeln ('Terima Kasih Sudah Menggunakan Program Ini');


READLN;
END.


Read Users' Comments ( 0 )