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

Why we use conio h in c?

1169


What is the function of this pointer?

1253


c language interview questions & answer

1921


How can I open files mentioned on the command line, and parse option flags?

1033


What is size of union in c?

990


Explain the use of #pragma exit?

1143


What does calloc stand for?

1108


Explain what is the difference between null and nul?

1101


Write a simple code fragment that will check if a number is positive or negative.

1116


Differentiate between a structure and a union.

1251


What is define c?

1024


What is a double c?

947


What are logical errors and how does it differ from syntax errors?

1251


a c code by using memory allocation for add ,multiply of sprase matrixes

2765


how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software

3275