#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int wybor; //wybor z menu
//menu
cout<<"1-pole trojkata rownobocznego boku a \n";
cout<<"2-pole prostokata o boku a i b \n";
cout<<"3-objetosc walca o promieniu r i wysokosci h \n";
cout<<"4-pole powierzchni prostopadloscianu o podstawie axb i wysokosci h \n";
cout<<"5-pole trapezu o bokach a, b i wysokosci h \n";
cout<<"wybierz co chcesz liczyc, podaj wartosc 1-5";
cin>>wybor;
switch(wybor)
{
case 1:
{
float a;
cout<<"podaj dlugosc boku a";
cin>>a;
cout<<"pole trojkata rownobocznego p=" <<((a*a)*sqrt(3))/2;
break;
}
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: