Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Write a function in c to find the area of a triangle whose length of three sides is given.

Answer Posted / reshma

#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 ?    14 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is this infamous null pointer, anyway?

1104


What is wrong with this initialization?

1065


Explain about the constants which help in debugging?

1422


What is a structure member in c?

1052


What is I ++ in c programming?

1170


What is a null string in c?

1104


How can you be sure that a program follows the ANSI C standard?

1659


What is the difference between pure virtual function and virtual function?

1181


What is a pointer on a pointer in c programming language?

1191


If I have a char * variable pointing to the name of a function ..

1232


how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12

1138


What is the benefit of using an enum rather than a #define constant?

1323


in linking some of os executables are linking name some of them

2201


Which type of language is c?

1123


What is the use of header?

1143