Procedure SCRSHO; const s1 = '%10.6f'; s2 = '%4.1f'; var ISCR,JSCR,I,J,JZ:integer; X,X1,X2,DX,YBIG,YSML,DYJ:real; Y:array[0..60] of real; SCR:array of array of string; BLANK,ZERO,YY,XX,FF,STR1,STR2:string; begin SetLength(SCR,61,22); ISCR:=60; JSCR:=21; BLANK:=' '; ZERO:='-'; YY:='1'; XX:='-'; FF:='x'; //Enter X1,X2 (X1=X2 to stop) X1:=-5; X2:=5; If X1 = X2 Then Exit ; For J:=1 To JSCR do begin SCR[1, J]:=YY; SCR[ISCR, J]:=YY; end; For I:=2 To ISCR - 1 do begin SCR[I, 1]:=XX; SCR[I, JSCR]:=XX; For J:=2 To JSCR - 1 do SCR[I, J]:=BLANK; end; DX:=(X2 - X1) / (ISCR - 1); X:=X1; YBIG:=0 ; YSML:=YBIG; For I:=1 To ISCR do begin Y[I]:=FUNC(X); If Y[I] < YSML Then YSML:=Y[I]; If Y[I] > YBIG Then YBIG:=Y[I]; X:=X + DX; end; If YBIG = YSML Then YBIG:=YSML + 1 ; DYJ:=(JSCR - 1) / (YBIG - YSML); JZ:=1 - Round(YSML * DYJ); For I:=1 To ISCR do begin SCR[I, JZ]:=ZERO; J:=1 + Round((Y[I] - YSML) * DYJ); SCR[I, J]:=FF; End; STR1:=' '; For I:=1 To ISCR do STR1:= STR1+SCR[I, JSCR]; Writeln(F,Format(s1,[YBIG]),' ',STR1); For J:=JSCR - 1 DownTo 2 do begin STR2:=' '; For I:=1 To ISCR do STR2:= STR2+SCR[I, J]; Writeln(F,' ',STR2); //Writeln(F); End; STR1:=' '; For I:=1 To ISCR do STR1:= STR1+SCR[I, 1]; Writeln(F,Format(s1,[YSML]),' ',STR1); Writeln(F,' ',Format(s2,[X1]), ' ',Format(s2,[X2])); end;