//D=D*163,33;(x=-100;x<0;x+=0.1)
{= A/pow((B*x+C),2)+D;=y*40;=x*40;-> SetPixel(rect.right/2-d,rect.bottom/2-y,RGB(0,0,255));
{xx=d;=y;;}-> MoveTo(rect.right/2-xx,rect.bottom/2-yy);-> LineTo(rect.right/2-d,rect.bottom/2-y);=d;=y;
}(x=0;x<100;x+=0.1)
{= A/pow((B*x+C),2)+D;=y*40;=x*40;-> SetPixel(rect.right/2-d,rect.bottom/2-y,RGB(0,0,255));(x==0)
{xx=d;=y;;}-> MoveTo(rect.right/2-xx,rect.bottom/2-yy);-> LineTo(rect.right/2-d,rect.bottom/2-y);=d;=y;
}
//вычисляем площадь новой фигуры
if(pDoc -> a>pDoc -> b)
{=pDoc -> b;=pDoc -> a;}
{=pDoc -> a;=pDoc -> b;}=(b-a)/n;(A<0) A = A*(-1);(i=1;i<n-1;i++)
{= a+i*h;(l==0)continue;= Sum + A/(pow((B*l + C),2))+D;
}= h*((A/(pow((B*a + C),2)) + A/(pow((B*b + C),2)))/2+Sum);(Q,S,10);-> TextOut(rect.left+10,rect.top+4,"Ïëîùàäü ôèãóðû:");-> TextOut(rect.left+10,rect.top+20,S);
// TODO: add draw code for native data here
}
// CKView printingCKView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparationDoPreparePrinting(pInfo);
}CKView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}CKView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
}
// CKView diagnostics
#ifdef _DEBUGCKView::AssertValid() const
{::AssertValid();
}CKView::Dump(CDumpContext& dc) const
{::Dump(dc);
}* CKView::GetDocument() // non-debug version is inline
{(m_pDocument->IsKindOf(RUNTIME_CLASS(CKDoc)));(CKDoc*)m_pDocument;
}
#endif //_DEBUG
// CKView message handlersCKView::OnParametresConstants()
{dlg;result = dlg.DoModal();(result == IDOK) {* pDoc = GetDocument();_VALID(pDoc);-> A = dlg.m_A;-> B = dlg.m_B;-> C = dlg.m_C;-> D = dlg.m_D;-> a = dlg.m_a;-> b = dlg.m_b;();
}
}
функція файл графік шкала
Додаток Б
Вікно програми