Implement the following two functions:
// Returns true if all the sides of the triangle // are same.
bool isValid(double side1, double side2, double side3)
// Returns the perimeter of an equilateral triangle.double perimeter(double side1)
The formula for computing the perimeter is perimeter = 3 * side. Write a test program that reads three sides for a triangle and computes the perimeter if the input is valid. Otherwise, display that the input is invalid.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here