G2A Many GEOs
SHARE
TWEET

Untitled

a guest Apr 8th, 2020 113 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <cmath>
  4. // Делаем имена из std доступными без префикса std ::
  5. using namespace std;
  6.  
  7. #define sqr(x) ((x)*(x))
  8. void main() {
  9.     double a, b, c, d, S, P;
  10.     cin >> a >> b >> c >> d;
  11.     // Нахождение перимера трапеции
  12.     P = a+b+c+d;
  13.     // Нахождение площади трапеции
  14.     S = ((a+b)/2)*sqrt((sqr(c)-sqr((sqr((b-a))+sqr(c)-sqr(d))/(2*(b-a)))));
  15.     cout << "P=" << P << "\n" << "S=" << S << "\n";
  16.     std :: system("pause")
  17. }
RAW Paste Data
Ledger Nano X - The secure hardware wallet
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top