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
define string ?
Explain how to reverse singly link list.
What standard functions are available to manipulate strings?
Can you tell me how to check whether a linked list is circular?
What is chain pointer in c?
What is wild pointer in c?
Why pointers are used?
Differentiate fundamental data types and derived data types in C.
Write a program which returns the first non repetitive character in the string?
What are register variables in c?
What is an lvalue?
Write a C program in Fibonacci series.
What is use of integral promotions in c?
Which is the best website to learn c programming?
What is structure padding and packing in c?