fork download
  1. Program M_power;
  2. var
  3. a, b, c: array [ 1..100 ] of integer;
  4. i, j, Ia, n, k: integer;
  5. Procedure M_mult( ax, bx: array [1..100, 1..100] of integer; Iax: integer; var cx: array [1..100, 1..100] of integer);
  6. var ix, jx, kx: integer;
  7. begin
  8. for ix:= 1 to Ia do
  9. for jx:= 1 to Ia do
  10. for kx:= 1 to Ia do
  11. cx[ ix, jx ]:= cx[ ix, jx ] + ax[ ix, kx ] * bx[ kx, jx ];
  12. end;
  13. begin
  14. readln( Ia );
  15. for i:= 1 to Ia do
  16. begin
  17. for j:= 1 to Ia do
  18. read( a[ i, j ] );
  19. readln;
  20. end;
  21.  
  22.  
  23. readln( n );
  24. k:= n;
  25. for i:= 1 to Ia do
  26. for j:= 1 to Ia do
  27. if i = j then b[ i, j ]:= 1
  28. else b[ i, j ]:= 0;
  29. for i:= 1 to Ia do
  30. for j:= 1 to Ia do
  31. c[ i, j ]:= a[ i, j ];
  32.  
  33. while k <> o do
  34. if k mod 2 = 0 then
  35. begin
  36. k:= k div 2;
  37. M_mult( c, c, Ia, c );
  38. end;
  39. else
  40. begin
  41. k:= k - 1;
  42. M_mult( b, c, Ia, b );
  43. end;
  44. for i:= 1 to Ia do
  45. begin
  46. for j:= 1 to Ia do
  47. write( b[ i, j ] );
  48. writeln;
  49. end;
  50. end.
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.pas:5: error: syntax error before `1'
prog.pas: In procedure `M_mult':
prog.pas:11: error: undeclared identifier `cx' (first use in this routine)
prog.pas:11: error:  (Each undeclared identifier is reported only once
prog.pas:11: error:  for each routine it appears in.)
prog.pas:11: error: undeclared identifier `ax' (first use in this routine)
prog.pas:11: error: undeclared identifier `bx' (first use in this routine)
prog.pas: In main program:
prog.pas:18: error: subscripted object is not an array or string
prog.pas:27: error: subscripted object is not an array or string
prog.pas:28: error: subscripted object is not an array or string
prog.pas:31: error: subscripted object is not an array or string
prog.pas:31: error: subscripted object is not an array or string
prog.pas:33: error: undeclared identifier `o' (first use in this routine)
prog.pas:37: error: too many (>1) arguments to routine `M_mult'
prog.pas:5: error:  routine declaration
prog.pas:37: error: too few (1) arguments to function `M_mult'
prog.pas:39: error: syntax error before `else'
stdout
Standard output is empty