Write a function in c to find the area of a triangle whose length of three sides is given.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / 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 |
What is the size of a union variable?
what is meant by c
what are you see during placement time in the student.
0 Answers Goldman Sachs, TCS, Tech Solutions,
How can you find the day of the week given the date?
Can we assign string to char pointer?
Who is the main contributor in designing the c language after dennis ritchie?
Combinations of fibanocci prime series
write an algorithm and a program to count the number of elements in a circularly singly linked list
Find the middle node in the linked list?? (Note:Do not use for loop, count and count/2)
What is meant by gets in c?
Why is C called a middle-level language?
what is default constructor?