Breaking

Search

Saturday, 3 November 2018

Program membalikkan angka

Berikut merupakan Program membalikkan angka menggunakan bahasa Pascal dengan menggunakan statement PROCEDURE.

  • SOURCE CODE
Program membalikkan_angka;
uses crt;
var
   a : string;
   i : integer;
   Procedure proses;
begin
clrscr;
     write('Masukkan angka     : ');readln(a);
     write('Hasil pembalikkan   : ');
     for i := length (a) downto 1 do
     begin
     write(a[i]);
     end;
     end;
     begin
     proses;
readkey;
end.

  • PENJELASAN SOURCE CODE
Program membalikkan_angka;     {Judul Program}
uses crt;     {Deklarasi unit CRT}
var     {Variabel}
   a : string;     {Inisiasi variabel}
   i : integer;     {Inisiasi variabel}
   Procedure proses;     {Procedure}
begin     {Awal instruksi program}
clrscr;     {Membersihkan layar}
     write('Masukkan angka    : ');     {Cetak Masukkan angka : }
     readln(a);     {Baca variabel a}
     write('Hasil pembalikkan  : ');     {Cetak Hasil pembalikkan :}
     for i := length (a) downto 1 do     {Memulai pengulangan sesuai dengan nilai variabel a kemudian nilainya di balik; misalnya input : 12345, maka output : 54321}
     begin     {Awal instruksi program}
     write(a[i]);     {Cetak variabel a[i]}
     end;     {Akhir instruksi kondisi}
     end;     {Akhir instruksi kondisi}
     begin     {Awal instruksi program}
     proses;     {Memanggil Procedure}
readkey;     {Instruksi untuk menunggu}
end.     {Akhir instruksi program}

  • PRINT SCREEN OUTPUT

Untuk mempermuda anda dalam mempelajari pemograman dengan menggunakan bahasa Pascal, admin telah menyediakan file Source code, Penjelasan source code, Output program, Flowchart dari source code, serta file pascalnya. Anda dapat mendownloadnya secara gratis di link download di bawah ini.

  • Title Program            : Membalikkan angka
  • Source Code .pdf       : .:_Download_:.
  • Flowchart .png          : .:_Download_:.
  • Program .pas             : .:_Download_:.
  • Password                   : kamuspascal.blogspot.com

Jika anda tidak tahu bagaimana cara mendownload file-file di atas klik Disini, untuk mempelajarinya.


2 comments:

  1. In this fashion my colleague Wesley Virgin's biography begins with this shocking and controversial video.

    Wesley was in the military-and shortly after leaving-he revealed hidden, "mind control" tactics that the government and others used to get everything they want.

    As it turns out, these are the same SECRETS lots of famous people (especially those who "became famous out of nothing") and top business people used to become wealthy and famous.

    You've heard that you use only 10% of your brain.

    That's really because most of your BRAINPOWER is UNTAPPED.

    Maybe this expression has even taken place INSIDE OF YOUR very own brain... as it did in my good friend Wesley Virgin's brain seven years back, while driving an unlicensed, beat-up garbage bucket of a car without a driver's license and $3.20 on his debit card.

    "I'm absolutely fed up with living check to check! Why can't I turn myself successful?"

    You took part in those types of questions, ain't it so?

    Your own success story is going to be written. You just have to take a leap of faith in YOURSELF.

    Learn How To Become A MILLIONAIRE Fast

    ReplyDelete

"Terima kasih telah mengunjungi dan membaca blog saya, silahkan tinggalkan komentar anda, Terima kasih."