#include <iostream>
#include <cmath>
using namespace std;
int main()
{
float a;
cout << "Podaj bok a: "; cin >> a;
if (a <= 0)
cout << "Blad! Dlugosc boku a musi byc liczba dodatnia";
else
{
cout << "h = " << a * sqrt(3) / 2 << endl; //funkcja sqrt liczy pierwiastek
cout << "P = " << pow(a, 2) * sqrt(3) / 4; //funkcja pow poteguje liczbe
}
return 0;
}