Write a program Area of Triangle.
//Find area of a triangle
#include<stdio.h>
#include<conio.h>
void main()
{
int base,height,area;
printf("\n Area of Triangle");
printf("\n Enter base=");
scanf("%d",&base);
printf("\n Enter height=");
scanf("%d",&height);
area=(base*height)/2;
printf("\n Area of triangle=%d",area);
getch();
}
Area of Triangle
Enter base=20
Enter height=4
Area of triangle=40
Related Program (Please Check)
0 Comments