|
|
вернуться в форумRe:Why my program does not work? >Why my program get Compilation error? >var t,i,j,m,k,l,n,max:longint; > a:array [1..10] of longint; > b:array [0..100000] of longint; >begin > for i:=1 to 10 do > begin > readln (t); > if t=0 then > begin > dec(i); > break; > end > else > a[i]:=t; > end; > for j:=1 to i do > begin > b[0]:=0; > b[1]:=1; > for m:=1 to a[j] do > begin > b[2*m]:=b[m]; > b[2*m+1]:=b[m]+b[m+1]; > end; > max:=b[0]; > for m:=0 to a[j] do > if b[m]>max then > max:=b[m]; > writeln (max); > end; >end. |
|
|