C++ Codeblock
using namespace std;
uzywając cin/cout

Odpowiedź:
#include <iostream>
using namespace std;
void obliczPoleTrapez(int podstawaA, int podstawaB, int wysokosc)
{
int pole = ((podstawaA+podstawaB)*wysokosc)/2;
cout << "Pole kwadratu wynosi: " << pole << endl;
cout << "Podstawy a i b: " << podstawaA << " i " << podstawaB;
}
int main()
{
cout << "Wprowadź długości podstaw i wysokość: " << endl;
int a, b, h;
cin >> a >> b >> h;
obliczPoleTrapez(a,b,h);
return 0;
}
Wyjaśnienie: