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


Please Help Members By Posting Answers For Below Questions

define string ?

669


Explain how to reverse singly link list.

606


What standard functions are available to manipulate strings?

560


Can you tell me how to check whether a linked list is circular?

770


What is chain pointer in c?

603






What is wild pointer in c?

607


Why pointers are used?

633


Differentiate fundamental data types and derived data types in C.

618


Write a program which returns the first non repetitive character in the string?

603


What are register variables in c?

575


What is an lvalue?

636


Write a C program in Fibonacci series.

635


What is use of integral promotions in c?

666


Which is the best website to learn c programming?

582


What is structure padding and packing in c?

621