C Language

Area of triangle in C Language :



#include<stdio.h>
main()
{
int a,b,area;
printf("\nenter the base of triangle = ");
scanf("%d",&a);

printf("\nenter the height of triangle = ");
scanf("%d",&b);

area=(a*b)/2;
printf("\nArea of triangle = %d",area);


}

Output :

Base of Triangle      :  456

Height of Triangle :  234

Result i.e. Area of triangle :  53352