Area of Triangle Program in C Language | write a C program to calculate Area of Triangle

Formula to Calculate Area of Triangle :
Area = ½ × b × h
b = base
h = vertical height
Description :
Here is the Area of Triangle program, User need to Enter base and Height Values. program will generates Area of Triangle.
Program :
-
/*Write a c program to find the area of any triangle*/
-
#include<stdio.h>
-
#include<conio.h>
-
void main()
-
{
-
int ht,base,area;
-
clrscr();
-
printf(“Enter the height and base of the triangle”);
-
scanf(“%d%d”,&ht,&base);;
-
area=0.5*ht*base;
-
printf(“nArea of the triangle is=%d”,area);
-
getch();
-
}