#include <iostream>
#include <cmath>
using namespace std;
int main()
{
float a, h;
cout << "podaj d1. podstawy t. a="<<end1;
cin >> a;
cout << "podaj wysokosc t. h="<<end1;
if(a>0 && h>0)
cout << "pole trojkata p="<<0.5*a*h<<end1;
else
{
pole= 0.5*a*h;
cout << "pole trojkata wynosi"<< pole;
}
return 0;
}
//****************************************************
/*
specyfikacja;
dane wejsciowe: dowolna liczba rzeczywista x, x>=0
dane wyjsciowe:
przyklad;
a) X=-1 dane nieprawidlowe (niezgodne ze specyfikacja)
b) x=64 dane prawidlowe sqrt (64 )=8
*/
To embed this project on your website, copy the following code and paste it into your website's HTML: