Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- class triangle
- {
- public:
- int a, b, c, p, P;
- float S;
- triangle(int a, int b, int c) {
- }
- int per()
- {
- P = a + b + c;
- p = P / 2;
- return P;
- }
- int square()
- {
- S = sqrt(p * (p - a) * (p - b) * (p - c));
- return S;
- }
- };
- int main()
- {
- triangle nya;
- cin >> nya.a;
- cin >> nya.b;
- cin >> nya.c;
- cout <<
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement