//MY C-PROGRAM FOR CALCULATING AREA OF TRIANGLE
#include <stdio.h>
int main ()
{
float height, base;
printf("Enter the height of triangle \n");
scanf("%f", &height);
printf("Enter the base of triangle \n");
scanf("%f", &base);
printf("The area of triangle is %f \n", height*base/2);
return 0;
}
No comments:
Post a Comment