#include #include using namespace std; float a, b, c, d, h; string A; int main () { cout << "Dzisiaj masz wybor co bedziesz liczyc " << endl; cout << "Pole i obwod prostokata wybierz 1" << endl; cout << "Pole i obwod trojkata wybierz 2" << endl; cout << "Pole i obwod trapezu wybierz 3" << endl; cin >> A; if (A=="1") { cout << "Wybrano prostokat :)" << endl; cout << "Podaj dlugosc boku a: "; cin >> a; cout << "Podaj dlugosc boku b: "; cin >> b; cout << "Pole: " << ab << endl; cout << "Obwod: " << a+a+b+b; } else { if (A=="2") { cout << "Wybrano trojkat :)" << endl; // cout << "Podaj dlugosc boku a, b, c: "; // cin >> a >> b >> c; cout << "Podaj dlugosc boku a: "; cin >> a; cout << "Podaj dlugosc boku b: "; cin >> b; cout << "Podaj dlugosc boku c: "; cin >> c; cout << "Podaj dlugosc wysokosci: "; cin >> h; cout << "Pole: " << (ah)/2 << endl; cout << "Obowd: " << a+b+c; } else { cout << "Wybrano trapez :)" << endl; cout << "Podaj dlugosc boku a: "; cin >> a; cout << "Podaj dlugosc boku b: "; cin >> b; cout << "Podaj dlugosc boku c: "; cin >> c; cout << "Podaj dlugosc boku d: "; cin >> d; cout << "Podaj dlugosc wysokosci: "; cin >> h; cout << "Pole: " << ((a+b)*h)/2 << endl; cout << "Obwod: " << a+b+c+d; } } return 0; }