by Dinesh Thakur

This is C program that asks user to find the area of a triangle using math’s function. Here user declares some variables that use to store the value of it. User asks to enter the value of triangle three sides of triangle. Here after value user using the method to find the area of triangle. And then print the result on the screen.

Problem statement:

This is C program that asks user to find out the area of triangle.

  1. Declare the variable.
  2. Using method of Triangle area function.
  3. Display result on the screen.

Method of Find area of Triangle:

" Area=sqrt(s*(s-a)*(s-b)*(s-c)); "

Here is C source code for finding the area of triangle. The output of this program shown below.

# include<stdio.h>

void main()
     int a,b,c;
     float area, s;
     printf("Enter the Three Sides of Triangle : ");
     scanf("%d %d %d" ,&a, &b, &c);
     printf("Area of the Triangle= %f ", area);

Area of a Triangle