fork download
  1. program ideone;
  2. const
  3. nmax=5;
  4. type
  5. mas1=array[1..nmax,1..nmax] of extended;
  6.  
  7. var
  8. A: mas1;
  9. n, i, j, imax,jmax: integer;
  10. absmax: double;
  11. begin
  12. n:=5;
  13. imax:=0;
  14. jmax:=0;
  15. for i:=1 to n do
  16. for j:=1 to n do
  17. read(A[i,j]);{:=2;StrToFloat(StringGrid1.Cells[j,i]);}
  18.  
  19. for i:=1 to n do
  20. begin
  21. for j:=1 to n do
  22. write(A[i,j]);{:=2;StrToFloat(StringGrid1.Cells[j,i]);}
  23. writeln();
  24. end;
  25.  
  26. absmax:=A[1][1];
  27. For i:=1 to n do
  28. For j:=1 to n do
  29. if abs(A[i,j])>absmax then
  30. begin
  31. imax:=i;
  32. jmax:=j;
  33. absmax:=A[i][j];
  34. end;
  35.  
  36. for i:=imax to n-1 do
  37. for j:=1 to n do
  38. A[i,j]:=A[i+1,j];
  39.  
  40. for j:=jmax to n-1 do
  41. for i:=1 to n-1 do
  42. A[i,j]:=A[i,j+1];
  43.  
  44.  
  45. for i:=1 to n-1 do
  46. begin
  47. for j:=1 to n-1 do
  48. write(A[i,j]);{:=2;StrToFloat(StringGrid1.Cells[j,i]);}
  49. writeln();
  50. end;
  51.  
  52. end.
Success #stdin #stdout 0s 276KB
stdin
1000 2 3 4 5 
6 7 128 9 10
1 2 3 4 5
6 7 80 9
10 5 6 7 8 2
stdout
 1.0000000000000000E+0003 2.0000000000000000E+0000 3.0000000000000000E+0000 4.0000000000000000E+0000 5.0000000000000000E+0000
 6.0000000000000000E+0000 7.0000000000000000E+0000 1.2800000000000000E+0002 9.0000000000000000E+0000 1.0000000000000000E+0001
 1.0000000000000000E+0000 2.0000000000000000E+0000 3.0000000000000000E+0000 4.0000000000000000E+0000 5.0000000000000000E+0000
 6.0000000000000000E+0000 7.0000000000000000E+0000 8.0000000000000000E+0001 9.0000000000000000E+0000 1.0000000000000000E+0001
 5.0000000000000000E+0000 6.0000000000000000E+0000 7.0000000000000000E+0000 8.0000000000000000E+0000 2.0000000000000000E+0000


 7.0000000000000000E+0000 1.2800000000000000E+0002 9.0000000000000000E+0000 1.0000000000000000E+0000
 2.0000000000000000E+0000 3.0000000000000000E+0000 4.0000000000000000E+0000 6.0000000000000000E+0000
 7.0000000000000000E+0000 8.0000000000000000E+0001 9.0000000000000000E+0000 5.0000000000000000E+0000
 6.0000000000000000E+0000 7.0000000000000000E+0000 8.0000000000000000E+0000 2.0000000000000000E+0000