Pages

Thursday, 12 June 2014

Pemograman Komputer Universitas Ahmad Dahlan

program ku;
uses wincrt;
var
   i,j,a,b,c,d:integer;
   x,r:array[1..10,1..10]of real;
   begin
   clrscr;

   write('Jumlah baris= ');readln(a);
   write('jumlah kolom= ');readln(b);
   writeln;
   writeln('Matrik A');
   for i:=1 to a do
   begin
   for j:=1 to b do
   begin
   write('Masukan Nilai Baris ke- ',i,' Kolom ke-',j,':');readln(x[i,j]);
   end;
   write;
   end;
   writeln;
   writeln('Matrik A');
   for i:=1 to a do
   begin
   for j:=1 to b do
   begin
   write(x[i,j]+r[i,j]:8:0);
   end;
   writeln;
   end;
   writeln;
   writeln('Transpos Matrik A');
   for i:=1 to a do
   begin
   for j:=1 to b do
   begin
   write(x[j,i]+r[j,i]:8:0);
   end;
   writeln;
   end;
   readln;
   end.

Pemograman Komputer

No comments:

Post a Comment