VOOZH about

URL: https://www.geeksforgeeks.org/dsa/find-perimeter-triangle/

⇱ Find Perimeter of a triangle - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Find Perimeter of a triangle

Last Updated : 7 Feb, 2026

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. 

👁 Perimeter 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.0

Time Complexity: O(1)

Auxiliary Space: O(1)

Comment