-
Code float AreaOfTriangle(float w, float h) {return (w * h) * 0.5;}
Test Cases Describe(any_group_name_you_want) { It(should_do_something) { Assert::That(AreaOfTriangle(4, 3), Equals(6)); Assert::That(AreaOfTriangle(6, 10), Equals(30)); Assert::That(AreaOfTriangle(10, 2), Equals(10)); } };
Output:
-
Code float AreaOfTriangle(float w, float h) {return (w * h) / 2;} //Get one-lined- float AreaOfTriangle(float w, float h) {return (w * h) * 0.5;}
- All
- {{group.name}} ({{group.count}})
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}