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 |
struct node {struct node*temp,*new} prinf("%d",sizeof(struct node));
Read N characters in to an array . Use functions to do all problems and pass the address of array to function. 1. Print only the alphabets . If in upper case print in lower case vice versa.
What do you mean by Recursion Function?
How can you find out how much memory is available?
find the sum of two matrices and WAP for it.
What is variable in c with example?
two progs are given. one starts counting frm 0 to MAX and the other stars frm MAX to 0. which one executes fast.
how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....
What are the modifiers available in c programming language?
What is c system32 taskhostw exe?
Write a program in C for showing working of different logical operator in C. Your program should guide users with proper message/menu on the console.
Can a binary search tree be used as an index? If yes, how? Explain