Advertisement
malixds_

Untitled

Feb 26th, 2022
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4.  
  5. class triangle
  6. {
  7. public:
  8.     int a, b, c, p, P;
  9.     float S;
  10.     triangle(int a, int b, int c) {
  11.    
  12.    
  13.    
  14.     }
  15.     int per()
  16.     {
  17.         P = a + b + c;
  18.         p = P / 2;
  19.         return P;
  20.     }
  21.  
  22.     int square()
  23.     {
  24.         S = sqrt(p * (p - a) * (p - b) * (p - c));
  25.         return S;
  26.     }
  27.  
  28. };
  29.  
  30. int main()
  31. {
  32.     triangle nya;
  33.     cin >> nya.a;
  34.     cin >> nya.b;
  35.     cin >> nya.c;
  36.     cout <<
  37.     return 0;
  38. }
  39.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement