100-days-of-rust/Week-07/Day-43_Area-Of-A-Triangle/README.md

14 lines
258 B
Markdown
Raw Normal View History

2023-03-24 01:14:34 +00:00
# Area of a Triangle
Write a function that takes the base and height of a triangle and return its area.
## Example
```text
triArea(3, 2) ➞ 3
triArea(5, 4) ➞ 10
triArea(7, 4) ➞ 14
triArea(10, 10) ➞ 50
triArea(12, 11) ➞ 66
triArea(0, 60) ➞ 0
```