Question: QUESTION 7 for the Triangle adt write an int main ( 0 ) test program to create a triangle t 1 with sides 3 ,

QUESTION 7
for the Triangle adt write an int main(0) test program to create a triangle t1 with sides 3,4 and 5 and print out its perimeter.
class Triangle {
int a;
int b;
int C;
public:
Triangle(int a , int b , int c )
:a(a),b(b),c(c){}
int perimeter(){
return a+b+c
}
};
QUESTION 7 for the Triangle adt write an int main

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!