Kasus : Membuat Program Array untuk menginput dua Program Studi kemudian menginput tiga Mahasiswa di setiap Program Studi.
program larik2;
uses crt;
var a,b : byte;
program larik2;
uses crt;
var a,b : byte;
NPM : array [1..2,1..3] of string;
Nama : array [1..2,1..3] of string;
begin
writeln (' ========== Program Array ==========');
writeln (' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
for a:=1 to 2 do
begin
writeln;
write('Prodi:'); readln(Prodi[a]);
writeln ('============================');
for b:=1 to 3 do
begin
write ('NPM :'); readln (NPM[a,b]);
write ('nama :'); readln (Nama[a,b]);
writeln ('============================');
end;
end;
end.
Output Programnnya :
No comments:
Post a Comment