/*To find area of the triangle*/
#include<math.h>
#include<stdio.h>
int main()
{
int a, b;
float area;
printf("Enter the value of height: ");
scanf("%d", &a);
printf("Enter the value of base: ");
scanf("%d", &b);
area=.5*a*b;
printf("\n The area of the triangle is: %f\n",area);
return(0);
}
#include<math.h>
#include<stdio.h>
int main()
{
int a, b;
float area;
printf("Enter the value of height: ");
scanf("%d", &a);
printf("Enter the value of base: ");
scanf("%d", &b);
area=.5*a*b;
printf("\n The area of the triangle is: %f\n",area);
return(0);
}
Comments
Post a Comment