![]() |
|
|
Регистрация Восстановить пароль |
Регистрация | Задать вопрос |
Заплачу за решение |
Новые сообщения |
Сообщения за день |
Расширенный поиск |
Правила |
Всё прочитано |
![]() |
|
Опции темы | Поиск в этой теме |
![]() |
#1 |
Пользователь
Регистрация: 14.11.2012
Сообщений: 36
|
![]()
Прошу помогите составит блок-схему к задаче по графику
uses graphABC; function F(x:real):real; begin F:=sqrt(1-x*x); end; var xn,xk,x,h,ymx,m:real; x1,y1:array[1..30] of real; n,i,x0,y0,y:integer; st:string; begin xn:=-1; xk:=1; h:=0.1; ymx:=F(xn); x:=xn; n:=0; while x<=xk do begin n:=n+1; x1[n]:=x; y1[n]:=F(x1[n]); if y1[n]>ymx then ymx:=y1[n]; x:=x+h; end; setwindowsize(640,500); x0:=2*windowwidth div 3-50; y0:=windowheight-170; m:=(windowwidth-x0-10)/xk; line(x0-round(xk*m),y0,x0+round(xk*m),y0); textout(windowwidth-25,y0-15,'X'); line(x0,y0,x0,60); textout(x0+10,60,'Y'); for i:=0 to 10*trunc(xk) do begin line(x0+round(m*i/10),y0+3,x0+round(m*i/10),y0-3); line(x0-round(m*i/10),y0+3,x0-round(m*i/10),y0-3); str(i*0.1:0:1,st); if i mod 2=0 then begin textout(x0+round(m*i/10),y0+10,st); textout(x0-round(m*i/10),y0+10,'-'+st); end; line(x0+3,y0-round(m*i/10),x0-3,y0-round(m*i/10)); textout(x0-30,y0-round(m*i/10),st); end; y:=round(m*y1[1]); moveto(x0+round(x1[1]*m),y0+y-round(y1[1]*m)); setpencolor(clGreen); circle(x0+round(x1[1]*m),y0+y-round(y1[1]*m),2); for i:=1 to n do begin setpencolor(clRed); lineto(x0+round(x1[i]*m),y0+y-round(y1[i]*m)); setpencolor(clGreen); circle(x0+round(x1[i]*m),y0+y-round(y1[i]*m),2); x:=x+h; end; setpencolor(clRed); textout(x0-60,0,'Функція y=sqrt(1-sqr(x))'); textout(x0-50,20,'на проміжку [-1;1]'); setpencolor(clBlack); textout(10,0,''); textout(30,20,'Таблиця значень функції'); line(10,50,10,50+(n+1)*18); line(60,50,60,50+(n+1)*18); line(110,50,110,50+(n+1)*18); for i:=0 to n+1 do line(10,50+i*18,110,50+i*18); textout(35,55,'X'); textout(85,55,'Y'); for i:=1 to n do begin str(x1[i]:0:2,st); textout(15,55+18*i,st); str(y1[i]:0:2,st); textout(65,55+18*i,st); end; end. |
![]() |
![]() |
![]() |
Опции темы | Поиск в этой теме |
![]() |
||||
Тема | Автор | Раздел | Ответов | Последнее сообщение |
Построение блок-схемы | Smokin_rockin | Помощь студентам | 0 | 15.11.2012 00:13 |
Построение Блок-Схемы | Bitte | Паскаль, Turbo Pascal, PascalABC.NET | 0 | 18.12.2011 13:45 |
БЛОК СХЕМЫ-ПОСТРОЕНИЕ | rdbykjhl | Паскаль, Turbo Pascal, PascalABC.NET | 2 | 11.02.2011 07:33 |
БЛОК-СХЕМЫ В ПАСКАЛЕ(PASKAL) | ~Vadim~ | Помощь студентам | 1 | 13.05.2010 16:24 |