Professional Documents
Culture Documents
Don 080310
Don 080310
#include<stdio.h>
int area (int a,int b,int c, int s)
Void void main()
{
int a,b,c,s,area;
int a;
int b;
int c;
int s;
int area;
Printf("enter the values of the sides of the triangle\n");
sScanf("%d%d%d",&a,&b,&c);
S=(a+b+c)/2;
aArea=squrt(s*(s-a)*(s-b)*(s-c));// calling function and passing parameters
Pprintf("the area of the triangle is %d",area);
getch();
}
I HAVE FOUND A PROGRAM THAT CAN HELP YOU TO FIND THE AREA OF
THE TRIANGLE; HAVE A; LOOK AT IT AND MODIFY THE PROGRAM, DON’T
COPY AND PASTE BUT DO SOME ADJUSTMENTS FOR THIS PROGRAM.
SEE BELOW
#include
#include
#include
voidmain()
{
clrscr();
int a,b,c,s,area;
printf("enter the values of the sides of the triangle\n");
scanf("%d%d%d",&a,&b,&c);
s=(a+b+c)/2;
area=squrt(s*(s-a)*(s-b)*(s-c));
printf("the area of the triangle is %d",area);
getch();
}