Page 60 - C:\Users\Admin\Desktop\Sach mem upweb\
P. 60

100 Problems & Solutions                                                Trang 60


                      End;

                      Function min2( a ,b : integer ) : integer;
                      Begin
                        If a < b then min2 := a Else min2 := b;
                      End;

                      Procedure Taobien( i ,j : integer );
                      Var  ii ,jj : integer;
                      Begin
                        FillChar(dd ,SizeOf(dd),1);
                        FillChar(xet,SizeOf(xet),1);
                        For ii := 1 to i do
                          For jj := 1 to j do
                            begin
                                   dd[ii,jj] := 0;
                                   xet[ii,jj]    :=    0;
                            end;
                      End;

                      Procedure Ghinhancauhinh;
                      Var  i ,j :    integer;
                      Begin
                        Inc(slch);
                        Writeln(f,sh ,' ' ,sc);
                        For i := 1 to sh do
                          begin
                                 For j := 1 to sc do Write(f,(dd[i,j] mod 2):2);
                                 Writeln(f)
                          end;
                      End;

                      Procedure Quaytrai;
                      Var  hinh1 : bang;
                              i,j : integer;
                      Begin
                        hinh1:= hinh;
                        For i := 1 to sh do
                          For j := 1 to sc do hinh[i,j] := hinh1[sc-j+1,i];
                      End;

                      Procedure Lathinh;
                      Var  hinh1 : bang;
                              i ,j : integer;
                      Begin
                        hinh1:= hinh;
                        For i := 1 to sh do
                          For j := 1 to sc do hinh[i,j] := hinh1[sh-i+1,sc-j+1];
                      End;




                      Tin học & Nhà trường                                       100 Đề Toán - Tin học
   55   56   57   58   59   60   61   62   63   64   65