Rabu, 17 November 2010

Bab 5

Proses Pengerjaan :

PROGRAM Hitung;

USES Crt;

TYPE
BilanganNyata = Integer;

VAR
panjang:BilanganNyata;
lebar:BilanganNyata;

BEGIN
ClrScr; {Membersihkan layar output}

panjang := 7; {Memberikan nilai pada variabel “panjang”}
lebar := 4; {Memberikan nilai pada variabel “lebar”}

WriteLn(‘Diketahui Panjang = 7, Lebar = 4’);
WriteLn(‘Rumus luas = Panjang x Lebar’);
WriteLn(‘Rumus keliling = 2 x (Panjang + Lebar)’);
WriteLn(”);
WriteLn(‘Hasil:’);
WriteLn(‘Luas = ‘, panjang * lebar);
WriteLn(‘Keliling = ‘, 2 * (panjang + lebar));
ReadLn;

END.

Rabu, 29 September 2010

Program yang menghasilkan bunyi nada.

Yang tidak kalah menarik dalam program Turbo Pascal adalah fungsi sound, fungsi ini digunakan untuk menghasilkan suara,

1. Fungsi sound (x), dimana x = adalah nada, menurut pengalaman penulis jika x= 100 , maka 100=do

x=200 , maka 200=re dst sampai x=1000=mi tinggi

2.ada sound maka ada fungsi no sound, digunakan untuk menghentikan suara
3.berikutnya fungsi delay, yang digunakan untuk memberikan lama waktu sound untuk lebih jelasnya dapat dilihat pada program dibaris dibawah ini



Program Suara;
uses crt;
var i,j:integer;
begin
clrscr;
writeln('Program sound ');
j:=100;
for i:=1 to 10 do
begin
sound(j);
writeln('Coba matikan winamp dan dengarkan suaranya');
delay(500);
nosound;
j:=j+100;
end;
readln;
end.

Untuk menghasilkan tempo yang dikehendaki cobalah mengganti angka pada delay, sedangkan untuk mendapatkan tinggi nada cobalah mengganti isi variabel j:= j+100 menjadi j:= j + 10 danseterusnya.

Selasa, 28 September 2010

PROGRAM JENIS BILANGAN

Program Kosntanta_numeric_integer;
Uses Crt;
Const
c1 =197; {byte}
c2 =-2; {shortInt}
c3 =1050; {Integer}
c4 =50678; {word}
c5 =3000000; {LongInt}
Begin
Clrscr;
Writeln('Bilangan byte =',c1:4);
Writeln('Bilangan shortInt =',c2:4);
Writeln('Bilangan Integer =',c3:4);
Writeln('Bilangan word =',c4:5);
Writeln('Bilangan LongInt =',c5:7);
Readln
End.

Selasa, 03 Agustus 2010

Jawaban Latihan Bab 3 Komputer

  1. Suatu program boleh tidak mempunyai judul program karena bersifat opsional (bisa diisi, bisa tidak)
  2. Pernyataan 'WriteLn('Halo') ditulis menjadi writeln ('Halo').
  3. Kegunaan kegunaan komentar pada program adalah untuk menelusuri kembali perintah-perintah yang ada.
  4. Komentar bagi komputer perlu karena bertindak sebagai dokumentasi.
  5. Yang tidak mengandung komentar adalah B
  6. Klausa USES ditempatkan sesudah kepala program
  7. Unit-unit standar pada Turbo pascal
  • Crt: berisi sejumlah rutin yang berkaitan dengan layar, keyboard dan suara
  • Dos: Berkaitan dengan operasi terhadap sistem operasi dan penanganan file
  • Graph: Berisi lebih dari 50 rutin yang berkaitan dengan operasi grafis.
  • Graph3: Menyediakan pengendali grafik kura-kura (turtlegraphics) yang tersedia pada Turbo Pascal versi 3.0
  • Overlay: Berisi rutin yang berguna overlay (berbagi memori bagi suatu program yg besar).
  • Printer: Berisi fasilitas untuk memudahkan pencetakan ke printer
  • System : Berisi sejumlah pustaka yang digunakan saat eksekusi
  • Turbo3 : Untuk menjaga kompatibilitas terhadap program Turbo Pascal versi 3.0.
  • WinDos: Merupakan implementasi rutin penanganan file dan sistem operasi. Unit ini merupakan alternatif dari unit Dos


Selasa, 06 Januari 2009

Why Altogether change ???


Why altogether change ???


one people in this world cross with me,, what wrong of me in fact? I enquire to my self alone, what will happened after this? Do happy me in life which suffered like? Why me life this world very is suffering? I even also of no use this world that people eye. I bewail my regret, time which me use just for writing poem for all people. After finishing to write this poem, I go to house learn and tell a story altogether to my teacher. And I knock at my teacher house front of coincidence opening that door is my teacher. Afterwards I tell a story about/around society me which always cross with teacher and me reply/ answer, why they cross with you? I reply/ answer not know beans about me of teacher. Why you wish to meet with me teacher word, I wish to come in contact with teacher to finish all these problem of my word teacher. I thirst for to assist you but I do not know its problem. I permit first I go home first learn thank you learn, word learn both of the same.

• And tomorrow altogether at coming to my house, direct society spell out members surprise, and I very glad they give surprise for me. In the reality they with me because them wish to give very beautiful surprise make me and I like once with presents which they pass to me. And they apologize to the which they do yesterday, And I forgive they were all. Society propose to perform a party this evening for me, Night have arrived I arrive at mount by wearing beautiful gown. Over there is a very big cake for me, over there also there is present which many. I very enjoying of beautiful nigh there is the star and moon, and night time decorating me. I fire very beautiful, that song is warbled dulcet by ear. After even finish I go home together friends at the same sing, we apart in deviation three. I direct return home, and bolt sleep. At morning after I go to play at to my friend house with the other friend, after us get home our friend, we set mind on to play at to jump string. We over there provided various dish that is cake, beverage, and other food, after wish finish to play at us eat and drink which have been provided by our friend mother. We finish to eat and drink direct us of permit to return home and say greeting, after us walk we us we see food place and direct us visiting. But its palace have matt out of condition, we pay a visit to that place after us see us wish to eat over there. We are in greeting warmness by steward. Friends wish to change this palace become competent place to be able to occupy and we ask contribution to friends, friends finally render money to develop build that palace become competent place because them feel pity whit one who at one’s post that thought available food very delicious.