Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
the answer is the last result
//fpc 3.0.4 program PDP11; var i,ii,j,jj,n:integer; a:array[1..8,1..8] of integer; function f(point1x,point1y,point2x,point2y:integer):integer; var sum,i,j:integer; begin sum:=0; for i:=point1x to point2x do for j:=point1y to point2y do sum:=sum+a[i,j]; f:=sum; end; procedure ff(point1x,point1y,point2x,point2y:integer); var i,j:integer; begin for i:=point1x to point2x do for j:=point1y to point2y do begin write(a[i,j]:3); if j=point2y then writeln; end; end; procedure maxsum; var sum,max:integer; begin max:=0; for i:=1 to 8 do for j:=1 to 8 do for ii:=1 to 8 do for jj:=1 to 8 do begin sum:=f(i,j,ii,jj); if sum>max then begin writeln(sum);max:=sum;ff(i,j,ii,jj);end; end; end; begin for i:=1 to 8 do for j:=1 to 8 do read(a[i,j]); maxsum; writeln('-----------end---------------'); end.
run
|
edit
|
history
|
help
0
jhjj
Vector Addition
TAPCON
Грицанова, стр. 26, Пример 1.7
practica 3 ejercicio B4
nomer1
[DE/GER] Vigenere Chiffre (Verschlüsselung)
practica 2 ejercicio 8
https://m.facebook.com/akansha.panchal.906?refid=12&ref=opera_speed_dial
подсчёт кратчайших путей