Pages

Subscribe:

Ads 468x60px

Friday, May 4, 2012

Contoh Program Turbo Pascal (Intro)

Soal 1


Uses crt;
Var
Orang1, orang2, TKP : string;
Begin
Clrscr;
Write(‘orang1=’);
readln(orang1);
Write(‘orang2=’);
readln(orang2);
Write(‘TKP=’);
raedln(TKP);
Writeln(orang1,’ ‘,’dan’,orang2,’ ‘,’bertemu di’,’ ‘,TKP);
Readln;
End.

Soal 2

Uses crt;
Var
r, luas : real;
const
p : real = 3.14;
Begin
Clrscr;
Writeln(‘Luas Lingkaran’);
Write(‘Masukan jari-jari = ’);
readln(r);
Luas:=p*r*r;
Writeln(‘Luas adalah = ’, Luas:5:2);
Readln;
End.

Selamat mencobaaaaaaaaaaaaa

No comments:

Post a Comment