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 / jenee

/* Write a function to find the area of a triangle whoes length of three sides is given */

#include<stdio.h>
#include<conio.h>

float triangle(float b,float h)
{
float result;
result=(b*h)/2;
return(result);
}

void main()
{
float a,b,ans;
clrscr();
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 ?    11 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of using linked list for tree construction?

1026


What is variable initialization and why is it important?

1167


Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent

2076


What are reserved words with a programming language?

1058


What is sizeof array?

1004


What is the benefit of using const for declaring constants?

994


Why does the call char scanf work?

1159


Why is extern used in c?

1053


int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer

993


How do you list files in a directory?

1078


Why is it usually a bad idea to use gets()? Suggest a workaround.

1691


How can you draw circles in C?

1100


The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none

1186


What is the purpose of realloc()?

1096


Explain the bubble sort algorithm.

1009