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
Can variables be declared anywhere in c?
can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......
What is signed and unsigned?
How can I call a function with an argument list built up at run time?
Can we access array using pointer in c language?
What would be an example of a structure analogous to structure c?
What is the use of getchar functions?
Explain what are run-time errors?
How do c compilers work?
What are the types of functions in c?
Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014 Npu university
int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;
What is the correct declaration of main?
Explain how do you determine whether to use a stream function or a low-level function?
Explain what is the best way to comment out a section of code that contains comments?