C Program to Calculate Area of a Triangle
To calculate area of a triangle we use the formula area=(base*length)/2
- //C Program to Calculate area of a triangle"
-
- #include<stdio.h>
-
- int main()
- {
- float b, h, area;
- printf("Enter base: ");
- scanf("%f", &b);
-
- printf("Enter height: ");
- scanf("%f", &h);
-
- area= (b*h)/2;
-
- printf("Area = %f", area);
- return 0;
- }
Output

Solution not working or have any suggestions? Please send an email to [email protected]
Download Android App