16. Uchburchakni uchta uchining koordinatalari berilgan. Uning yuzasini topuvchi funksiya tuzing.
#include
#include
using namespace std;
int main(){
float x1,y1,x2,y2,x3,y3,a,b,c,p,S;
cout<<" x1= "; cin>>x1;
cout<<" y1= "; cin>>y1;
cout<<" x2= "; cin>>x2;
cout<<" y2= "; cin>>y2;
cout<<" x3= "; cin>>x3;
cout<<" y3= "; cin>>y3;
a=sqrt(pow((x1-x3),2)+pow((y1-y3),2));
b=sqrt(pow((x2-x1),2)+pow((y2-y1),2));
c=sqrt(pow((x2-x3),2)+pow((y2-y3),2));
p=(a+b+c)/2;
S=sqrt(p*(p-a)*(p-b)*(p-c));
cout<<" Uchburchakning yuzasi: "<}
Foydalanilgan adabiyotlar:
Abduqоdirоv A. Infоrmatika. 2002.
2. Zakirоva F.M. Infоrmatika i infоrmatsiоnnie texnоlоgii. 2007.
3. Оbidоv A.A. Infоrmatika misоl va masalalar. 2006.
4. Tоylоqоv N., Axmedоv A. IBM - PC Kоmpyuteri. - T.: "O’zbekistоn", 2001.
5. G’ulоmоv S.S. va bоshqalar. Axbоrоt tizimlari va texnоlоgiyalari - T.: "Sharq", 2000.
6. Ermatоv Sh.T. Shaxsiy kоmpyuterlar. Оperatsiоn tizimlar, qurilmalar. 2006.
7. Proff.M.M.Arihov “Informatika.Axborot texnologiyalari” (1-2-qismlari) 2003 y.
8. T.X.Xolmatov,N.I.Tayloqov,U.A.Nazarov “Informatika” 2003 y.
Do'stlaringiz bilan baham: |