About Me

My photo
Raipur, Chhattisgarh, India
Hi , I am Amit Thakur. I have worked as a QA Engineer for two years and as a Java Developer for one year in NIHILENT TECHNOLOGIES PVT. LTD., Pune.Currently I am working as DEAN (Research & Development) in Bhilai Institute of Technology, Raipur.

Tuesday, August 27, 2013

Area of Right Angled Triangle

Right angle Triangle
 Definition :
  1. Triangle having one angle of measure 90 degree is called Right angle Triangle.
  2. Sides of Triangle are : base , height , hypotenuse.
  3. You can compute the area of a Tr. if you know its any two sides.

Program :
#include
#include
void main()
{
int base,height;
float area;
clrscr();  // Clear Screen

printf("Enter the base of Right Angle Triangle : ");
scanf("%d",&base);

printf("Enter the height of Right Angle Triangle : ");
scanf("%d",&height);

area = 0.5 * radius * radius;

printf("Area of Right Angle Triangle : %f",area);
getch();
}
Output :
Enter the base of Right Angle Triangle   : 4
Enter the height of Right Angle Triangle : 8
Area of Right Angle Triangle : 16.0

No comments: