Senin, 11 April 2016

Program Pascal Sederhana

Kita Akan Membuat program pascal
1.Pertama buka program free pascalnya
2.Setelah itu buat baru file > new
3. ketikan / copas kode dibawah

 Versi 1
program input;
uses crt;
var
b,c,d,e, f:string;
begin
clrscr;
writeln('************************************');
writeln('            Data Siswa             ');
writeln('=================================');
write('Nama                       :');readln(b);
write('Umur                       :');readln(c);
write('No Absen               :');readln(d);
write('Kelas                        :');readln(e);
writeln('************************************');
writeln('=================================');
writeln('            Data Siswa             ');
writeln('=================================');
writeln('Nama Saya  ',b);
writeln('Umur Saya  ',c);
writeln('Nomer Absen Saya  ',d);
writeln('Saya Kelas ',e);
writeln('=================================',f);
readln;
end.

 Versi 2


Program input1;
uses crt;
var          nama,sekolah,agama,jurusan:string;
                kelamin,kelas:char;
                umur:integer;
begin
clrscr;
writeln(‘_______________Identitas____________’);
writeln(‘Gunakan Kata-Kata ‘);
write(‘Nama                      : ‘);readln(nama);
write(‘Sekolah                  : ‘);readln(sekolah);
write(‘Jurusan                   : ‘);readln(jurusan);
write(‘Agama                    : ‘);readln(agama);
writeln(‘Gunakan Satu Huruf [ contoh = x ]’);
write(‘Kelamin L/W         : ‘);readln(kelamin);
write(‘Kelas                        : ‘);readln(kelas);
writeln(‘Gunakan Angka’);
writeln(‘Umur                   : ‘);readln(umur);
writeln(‘’);
writeln(‘Nama Anda ‘,nama,’ Bersekolah di ‘,sekolah,’ Jurusan ‘,jurusan );
writeln(‘Anda Kelas ‘,kelas,’ Beragama ‘,agama,’ Dengan umur ‘,umur );
readln;
end.
Load disqus comments

0 komentar