[ask]membuat program input data

Pemrograman menggunakan Free Pascal dan Lazarus

[ask]membuat program input data

Postby ichigo56 » 23 Mar 2011, 21:59

Maaf saya mau nanya, bagai mana caranya membuat program input seperti ini:

Input data mahasiswa
NIM:
Nama:
Nilai:
input lagi? Y/N

ketentuannya, jika Y maka akan muncul lagi masukan Nim, Nama, Nilai.
jika N maka keluar.

kemudian, kalau mau membuat tampilan output seperti ini gimana ya?

Nim Nama Nilai
001 xxx 80

maaf kalau terlalu banyak. sebelumya terima kasih,
ichigo56
Junior Member
 
Posts: 8
Joined: 23 Mar 2011, 21:40

RE: [ask]membuat program input data

Postby leledumbo » 24 Mar 2011, 00:51

udah bisa baca input? yang y/n mau pencet kibord langsung jalan apa enter dulu? ngulangnya pake repeat-until. itu outputnya gak ada formatnya sama sekali kok, ya cetak aja pisahin pake spasi.
leledumbo
Senior Member
 
Posts: 262
Joined: 24 May 2010, 15:58

RE: [ask]membuat program input data

Postby D.E » 24 Mar 2011, 09:16

Itu mode console apa GUI?
Workflow secara umum:

Recursive
Code: Select all
  1. 1. Buat procedure EntryData;

  2.     1. Prompt input NIM, NAMA, NILAI

  3.     2. Prompt input lagi?

  4.         Y: Call EntryData;

  5.         N: Do nothing (exit recursive proc)

  6. 2. Call EntryData



Looping
Code: Select all
  1. while True do

  2. begin

  3.   Prompt input NIM, NAMA, NILAI

  4.   Prompt input lagi?

  5.     Y: Do nothing (lanjut loop)

  6.     N: Exit; // keluar loop

  7. end;

:idea: Dude, if you don't understand the basics and just want to get someone else write the code for you, it means you really shouldn't study computer science. Find different field!
User avatar
D.E
Senior Member
 
Posts: 638
Joined: 04 May 2010, 18:12

RE: [ask]membuat program input data

Postby ichigo56 » 24 Mar 2011, 17:22

programnya console,,,,
ichigo56
Junior Member
 
Posts: 8
Joined: 23 Mar 2011, 21:40

RE: [ask]membuat program input data

Postby D.E » 24 Mar 2011, 17:50

@ichigo56: Apapun jenis programmnya, beginilah workflownya :D
Ada pertanyaan?
:idea: Dude, if you don't understand the basics and just want to get someone else write the code for you, it means you really shouldn't study computer science. Find different field!
User avatar
D.E
Senior Member
 
Posts: 638
Joined: 04 May 2010, 18:12

RE: [ask]membuat program input data

Postby ichigo56 » 24 Mar 2011, 20:27

Trima kasih atas jawabannya,
pascal bisa pake mode GUI juga ya? pakeknya apa?
ichigo56
Junior Member
 
Posts: 8
Joined: 23 Mar 2011, 21:40

RE: [ask]membuat program input data

Postby D.E » 25 Mar 2011, 08:18

Eh maaf, saya pikir Anda pake FPC atau Delphi di mode console. Turbo Pascal for DOS tidak mendukung mode GUI.
:idea: Dude, if you don't understand the basics and just want to get someone else write the code for you, it means you really shouldn't study computer science. Find different field!
User avatar
D.E
Senior Member
 
Posts: 638
Joined: 04 May 2010, 18:12

RE: [ask]membuat program input data

Postby leledumbo » 25 Mar 2011, 19:30

pascal bisa pake mode GUI juga ya? pakeknya apa?

tolong dibedakan Pascal sebagai bahasa pemrograman dengan Turbo Pascal / Free Pascal (FPC) / Delphi sebagai implementasinya. tidak ada kaitan antara Pascal dengan GUI, namun implementasi modernnya (FPC dan Delphi) menyediakan interface untuk mengakses GUI yang disediakan OS / library 3rd party lain.

Untuk pemrograman GUI yang mudah, bisa digunakan Lazarus (open source, underlying compilernya FPC) atau Delphi.
leledumbo
Senior Member
 
Posts: 262
Joined: 24 May 2010, 15:58

RE: [ask]membuat program input data

Postby ichigo56 » 26 Mar 2011, 10:57

@D.E, gpp kok saya jga msih belajar,,,:)

@leledumbo, terima kasih atas pencerahannya,,,:rolleyes:
ichigo56
Junior Member
 
Posts: 8
Joined: 23 Mar 2011, 21:40


Who is online

Users browsing this forum: No registered users and 1 guest

cron