We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Small Triangles, Large Triangles
Small Triangles, Large Triangles
Sort by
recency
|
431 Discussions
|
Please Login in order to post a comment
Epihany. having a separate function for calculating area makes the code much simpler to understand and implement...
float calcArea (triangle tr) //func for cleaner code to calculate the area
{ float p = (tr.a + tr.b + tr.c) / 2.0;
}
void sort_by_area(triangle* tr, int n)
{
}
This is also one of the same way double area(triangle tr) { double s=(tr->a+tr->b+tr->c)/2.0; if((tr->a+tr->b)>tr->c&&(tr->b+tr->c)>tr->a&&(tr->a+tr->c)>tr->b) { double area=sqrt(s(s-tr->a)(s-tr->b)(s-tr->c)); return area;
}
void sort_by_area(triangle* tr, int n) {
}
Why does my code compile differently in vscode than in the test case here?