![]() |
VOOZH | about |
Given side (a, b, c) of a triangle, we have to find the perimeter of a triangle.
Perimeter :
Perimeter of a triangle is the sum of the length of side of a triangle.
where a, b, c are length of side of a triangle.
Perimeter of a triangle can simply be evaluated using following formula :
Examples :
Input : a = 2.0, b = 3.0, c = 5.0
Output : 10.0
Input : a = 5.0, b = 6.0, c = 7.0
Output : 18.0
Output :
10.0Time Complexity: O(1)
Auxiliary Space: O(1)