Program Pascal Penginputan Data Dosen Menggunakan Array

Program Pascal Penginputan Data Dosen Menggunakan Array 

Program Pascal Penginputan Data Dosen Menggunakan Array
Gambar tersebut merupakan output dari program pascal input data dosen

Nahhh disini saya akan memberikan source code program pascal yang bisa anda copy dan jangan lupa untuk dipelajari dan dipahami agar mudah membuat program pascal selanjutnya yang berhubungan dengan penginputan data. Dan saya juga menampilkan tampilan program serta outputnya agar mengetahui jika program dijalankan.

Contoh Program Pascal Penginputan Data Dosen Menggunakan Array langsung saja bisa dilihat dibawah sini...

Source Code

uses crt;

var

            NIDN: array[1..30] of String[8];

            Nama: array[1..30] of String[30];

            MK : array[1..30] of String;

            No_HP : array[1..30] of String;

            tanya: String;

            i,j: Integer;

begin

            clrscr;

            tanya:='Y';

            i:=0;

 writeln('==================================================================');

            gotoxy(35, 2) ; writeln('Input Data Dosen');

           writeln('==================================================================');

             write('No');

             gotoxy(4, 4) ; write('NIDN');

             gotoxy(20, 4) ; write('Nama');

             gotoxy(40, 4); write('Mata Kuliah');

             gotoxy(60, 4); write('No HP');

             gotoxy(80, 4); writeln('Lagi');

           writeln('==================================================================');

            while ((tanya='Y') or (tanya='y')) do

                        begin

                                    i:=i+1;

                                    gotoxy(1, 5+i) ; write(i);

                                    gotoxy(4, 5+i) ; Readln (NIDN[i]);

                                    gotoxy(20, 5+i) ; Readln (Nama[i]);

                                    gotoxy(40, 5+i) ; Readln (MK[i]);

                                    gotoxy(60, 5+i); ; Readln (No_HP[i]);

                                    gotoxy(80, 5+i); ; Readln (tanya);

                         end;

            writeln('==================================================================');

             write('Cetak Data Dosen : '); Readln(tanya);

                        if ((tanya='Y') or (tanya='y')) then

                                    begin

                                    clrscr;

            writeln('==================================================================');

                                    gotoxy(35, 2) ; writeln('Data Dosen');

            writeln('==================================================================');

                                    write('No');

                                    gotoxy(4, 4) ; write('NIDN');

                                    gotoxy(20, 4) ; write('Nama');

                                    gotoxy(40, 4); write('Mata Kuliah');

                                    gotoxy(60, 4); writeln('No HP');

             writeln('==================================================================');

            for j:=1 to i do

                        begin

                                    gotoxy(1, 5+j) ; write(j);

                                    gotoxy(4, 5+j) ; write(NIDN[j]);

                                    gotoxy(20, 5+j) ; write(Nama[j]);

                                    gotoxy(40, 5+j); write(MK[j]);

                                    gotoxy(60, 5+j); writeln(No_HP[j]);    

                        end;

            writeln('==================================================================');

                        end;

            Readln;

end.



Note : Jangan Lupa Dipelajari yaa
See you

Post a Comment

0 Comments