#include <stdio.h>
float calcAreaofTriangle(float base, float height);
int main(void) {
float base = 10;
float height = 12;
float triangle = calcAreaofTriangle(base, height);
float area;
// your code goes here
return 0;
}
// **************************************************
// Function: calcAreaOfTriangle
//
// Description: Calculates the area of a triangle
//
//
// Parameters: base - base of the triangle
// height - height of the triangle
//
// Returns: area - area of triangle
//
// ***************************************************
float calcAreaofTriangle(float base, float height)
{
float area; // area of the triangle
area = 0.5 * base * height; // Area of triangle is .5 x W x H plugin variables
return area;
} //calcAreaOfTriangle
I2luY2x1ZGUgPHN0ZGlvLmg+CgpmbG9hdCBjYWxjQXJlYW9mVHJpYW5nbGUoZmxvYXQgYmFzZSwgZmxvYXQgaGVpZ2h0KTsKCQppbnQgbWFpbih2b2lkKSB7CglmbG9hdCBiYXNlID0gMTA7CglmbG9hdCBoZWlnaHQgPSAxMjsKCWZsb2F0IHRyaWFuZ2xlID0gY2FsY0FyZWFvZlRyaWFuZ2xlKGJhc2UsIGhlaWdodCk7CglmbG9hdCBhcmVhOwoJcHJpbnRmKCIlZiIsIHRyaWFuZ2xlKTsKCS8vIHlvdXIgY29kZSBnb2VzIGhlcmUKCXJldHVybiAwOwp9CgoKLy8gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLy8gRnVuY3Rpb246IGNhbGNBcmVhT2ZUcmlhbmdsZQovLwovLyBEZXNjcmlwdGlvbjogQ2FsY3VsYXRlcyB0aGUgYXJlYSBvZiBhIHRyaWFuZ2xlCi8vCi8vCi8vIFBhcmFtZXRlcnM6IGJhc2UgICAtIGJhc2Ugb2YgdGhlIHRyaWFuZ2xlCi8vICAgICAgICAgICAgIGhlaWdodCAtIGhlaWdodCBvZiB0aGUgdHJpYW5nbGUKLy8KLy8gUmV0dXJuczogICAgYXJlYSAtIGFyZWEgb2YgdHJpYW5nbGUKLy8KLy8gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCgpmbG9hdCBjYW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