0% found this document useful (0 votes)
7 views2 pages

Code Program Untuk Membuat Matriks A

The document is a Pascal program that allows users to input a matrix of size 5x3, consisting of student IDs and course grades. It defines procedures for inputting and displaying the matrix. The program utilizes arrays to store the data and includes user prompts for data entry.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

Code Program Untuk Membuat Matriks A

The document is a Pascal program that allows users to input a matrix of size 5x3, consisting of student IDs and course grades. It defines procedures for inputting and displaying the matrix. The program utilizes arrays to store the data and includes user prompts for data entry.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

program Membuat_Matriks_A;

{I.S.: User Memasukan Elemen Matrik A Berordo 5 x 3}


{F.S.: Menampilkan Matriks A Berordo 5 x 3}
uses crt;
const
maksbaris = 50;
makskolom = 5;
type
larik1 = array[1..maksbaris] of string;
larik2 = array[1..makskolom] of string;
matriks1 = array[1..maksbaris,1..makskolom] of integer;
matriks2 = array[1..maksbaris,1..makskolom] of char;
var
NIM : larik1;
MK : larik2;
Nilai : matriks1;
Idx : matriks2;
M,N : integer;

procedure isimatriks(var m,n:integer);


{I.S.: User Memasukan Elemen Matrik A Berordo M x N}
{F.S.: Menghasilkan Matriks A Berordo M x N}
var
i,j:integer;
begin
writeln('Memasukan Matriks');
writeln('-----------------');
write('Banyaknya Mahasiswa: '); readln(m);
write('Banyaknya Mata Kuliah: '); readln(n);
clrscr;
gotoxy(13,2); write('Mata Kuliah');
gotoxy(2,4); write('NIM');
for j := 1 to n do
begin
gotoxy(j*13,4); readln(mk[i,j]);
end;
for i := 1 to m do
begin
gotoxy(2,i+5); readln(nim[i,j]);
end;
for i := 1 to m do
begin
for j := 1 to n do
begin
gotoxy(j*13,i+5); readln(nilai[i,j]);
end;
end;
end;

// procedure tampilmatriks(A:matriks);
{I.S.: Elemen Matrik A Berordo 5 x 3 sudah terdefinisi}
{F.S.: Menampilkan Matriks A Brordo 5 x 3}
{ var
i,j:integer;
begin
clrscr;
writeln('Hasil Matriks A');
writeln('---------------');
for i := 1 to 5 do
begin
for j := 1 to 3 do
begin
gotoxy(j*5-4,i+2); delay(700); write(A[i,j]);
end;
end;
end; }

begin
isimatriks(m,n);
// tampilmatriks(A);
readln;
end.

You might also like