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

100 Problems & Solutions                                                Trang 87


                           'L' : swap( 0,-1);
                           end;
                      end;

                      procedure docf;
                      var       f    :        text;
                                i,j    :        byte;
                                s      :        string[5];
                                ch     :        char;
                      begin
                           assign(f,fi);
                           reset(f);
                           for i :=1 to 5 do
                               begin
                                    readln(f,s);
                                    if length(s) = 4 then s := s+ #32;
                                    for j := 1 to 5 do
                                        begin
                                             A[i,j] := s[j];
                                             if A[i,j] = #32 then
                                                begin
                                                     blank.x := i;
                                                     blank.y := j;
                                                end;
                                        end;
                               end;
                           while not seekeof(f) do
                                 begin
                                      read(f,ch);
                                      if ch = '0' then exit;
                                      chuyen(ch);
                                 end;
                           close(f);
                      end;

                      BEGIN
                           clrscr;
                           docf;
                           yes_yes_and_yes;
                      END.

                      Bài 40/2000 - Máy định vị Radio
                      Uses crt;
                      Const nmax = 30;
                            Output = 'P27.out';
                            Input = 'P27.inp';
                      Type
                              str20 = string[20];
                      Var
                         Toado : Array[1..nmax,1..2] of real;
                         TenDen,TenDen1,TenDen2 : Array[1..nmax] of str20;
                         n,j,i,k:integer;
                         Td1,Td2:array[1..2] of integer;
                         goc,g1,g2,v,l:array[1..2] of real;
                         t1,t2:array[1..2] of integer;
                         xd,yd,x,y, x1,x2,y1,y2:array[1..2] of real;
                         f:text;



                      Tin học & Nhà trường                                       100 Đề Toán - Tin học
   82   83   84   85   86   87   88   89   90   91   92