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.


0 comments:

Post a Comment