OOP HomeWork
This commit is contained in:
5
oop_hw1/oop_hw1_4/t_area.cpp
Normal file
5
oop_hw1/oop_hw1_4/t_area.cpp
Normal file
@@ -0,0 +1,5 @@
|
||||
#include <cmath>
|
||||
double triangle_area(double a, double b, double c) {
|
||||
double s = (a + b + c) / 2;
|
||||
return sqrt(s * (s - a) * (s - b) * (s - c));
|
||||
}
|
Reference in New Issue
Block a user