//Pole_trojkata
#include <iostream>
using namespace std;
int main()
{
float a, h;
cout << "Podaj a: ";
cin >> a;
cout << "Podaj h: ";
cin >> h;
cout << "Pole trojkata wynosi P = "<< a*h*0.5;
return 0;
}
---------------------
//Średnia
#include <iostream>
using namespace std;
int main()
{
float a, b, c;
cout << "Podaj a: ";
cin >> a;
cout << "Podaj b: ";
cin >> b;
cout << "Podaj c: ";
cin >> c;
float suma = a + b + c;
cout << "Suma wynosi = " << suma << endl;
cout << "Srednia arytmetyczna wynosi = " << suma/3 << endl;
return 0;
}