Solutions will be marked by Automated Marking Software.
The use of tools other than those allowed in the above section whether intentionally or unintentionally, is considered a violation of the exam rules, and the score is 0
(2 marks)
The given file Q1.c already contains statements to input data for 3 variables a, b, and c. You should write statements to print out the area of the triangle using heron's formula.
Where: p is the half-perimeter of the triangle
S=p(p-a) (p-b)(p - c)
Notes:
- Do not edit given statements in the main function.
- You can create new function(s) if you see it is necessary.
2 of 2
Paper No: 1
- The output result is formatted in two decimal places
Sample input and output:
Input: a = 3, b = 4, c = 5
After processing: result = 6.00
Output for marking:
OUTPUT:
6.00
Zoom
+ 100%
Close