Write a function to find the area of a triangle whose
length of three sides is given
Answer Posted / urja pandya
#include<stdio.h>
#include<conio.h>
float triangle (float b, float h)
{
float result;
result=(b*h)/2;
return(result);
}
void main()
{
clrscr();
float a,b,ans;
printf(“Enter the Base of Triangle: “);
scanf(“%f”,&a);
printf(“Enter the Height of Triangle: “);
scanf(“%f”,&b);
ans=triangle(a,b);
printf(“Area of Triangle is %f”,ans);
getch();
}
| Is This Answer Correct ? | 49 Yes | 30 No |
Post New Answer View All Answers
What is the condition that is applied with ?: Operator?
What is include directive in c?
What is array of pointers to string?
I have seen function declarations that look like this
How can I find out if there are characters available for reading?
Are c and c++ the same?
Can a pointer be volatile in c?
Difference between Shallow copy and Deep copy?
Why is c known as a mother language?
Can an array be an Ivalue?
Can we add pointers together?
Is Exception handling possible in c language?
What is multidimensional arrays
define string ?
How can I recover the file name given an open stream or file descriptor?