#include <stdio.h>

#include <conio.h>

#include <math.h>

void main()

{

int a,b,c,p;

float s,temp,area;

clrscr();

printf("Sides: ");

scanf("%d %d %d",&a,&b,&c);

if(a>0&&b>0&&c>0)

{

p=(a+b+c);

s=p/2;

temp=s*(s-a)*(s-b)*(s-c);

if(temp>0)

{

area=sqrt(temp);

printf("\nThe Area of Triangular is %.2f",area);

}

else

{

printf("\nInvalid Value!!");

}

}

else

{

printf("\nCheck sides Value!!");

}

getch();

}

#include <conio.h>

#include <math.h>

void main()

{

int a,b,c,p;

float s,temp,area;

clrscr();

printf("Sides: ");

scanf("%d %d %d",&a,&b,&c);

if(a>0&&b>0&&c>0)

{

p=(a+b+c);

s=p/2;

temp=s*(s-a)*(s-b)*(s-c);

if(temp>0)

{

area=sqrt(temp);

printf("\nThe Area of Triangular is %.2f",area);

}

else

{

printf("\nInvalid Value!!");

}

}

else

{

printf("\nCheck sides Value!!");

}

getch();

}

## No comments:

## Post a Comment