program operasi_matrix; const max = 50; type Mat = array [1..max, 1..max] of real; var u1, u2, u3, u4 : byte; i, j, pilih : byte; m1, m2, m3 : Mat; procedure tampilMatrix(a: Mat; m, n : byte); var i, j : byte; begin for i:=1 to m do begin for j:=1 […]
August 5, 2010
Ilustration : step-1 numbers in array unsort step-2 split array step-3 split again… step-4 split again… step-5 split again…, and start to merging step-6 get the small value and save it into array step-7 first left side has finish The above ilustration has not yet fisnish, you can get the complete ilustration in here, and […]
July 1, 2010
program permutasi(input,output); uses crt; var n,r:byte; function faktorial(c:byte):integer; begin if c<=1 then faktorial:=1 else faktorial:=c*faktorial(c-1); end; function permutasi(a,b:byte):real; begin permutasi:=faktorial(a)/faktorial(a-b); end; begin clrscr; writeln('Program mencari nilai permutasi'); write('Masukkan nilai n : '); readln(n); write('Masukkan nilai r : '); readln(r); writeln('Hasil Perhitungan : ', permutasi(n,r):0:2); readln; end.
June 22, 2010
program find_modus(Output); uses crt; type jns_nilai = (banyak_duplikasi, mungkin_modus); cacahan_modus = array[1..1000, jns_nilai] of integer; int_array = array[1..1000] of integer; var x : int_array; modus : cacahan_modus; i, j, n, tmp, k : integer; min, max : integer; count, tmpmodus : integer; begin clrscr; write(‘banyak data : ‘); readln(n); randomize; { .:: Input data ::. […]
June 21, 2010
program beri_nilai(Output); uses crt; type jenis_ujian=(mid,uas); // nilai ordinalnya : 0,1 nilai= array[1..10,jenis_ujian] of byte; var _n : nilai; i,j : byte; begin clrscr; randomize; for i:=1 to 10 do begin for j:=ord(mid) to ord(uas) do begin if (j=ord(mid)) then begin _n[i,mid]:=random(100); write(‘Nilai Mid siswa-‘,i,’ : ‘,_n[i,mid]); write(‘ ‘:4); end else begin _n[i,uas]:=random(100); write(‘Nilai UAS […]
July 15, 2011
0