New Member FAQ | Forums | Earn Revenue


Resources Entrance Ask Experts Exam Papers Jobs English Projects Universities Colleges Courses Schools Training My India



My Profile
Active Members
TodayLast 7 Days more...



Awards & Gifts
Online Exams

Fresher Jobs


Our fresher job section is exclusively for fresh graduates! Find jobs for freshers in major Indian cities including Bangalore, Chennai, Hyderabad, Pune or Kochi

Resources


Find educational articles, blogs, discussion threads and other resources.

Colleges


Find details about any college in India or search for courses.

website counter



Type of Triangle


Posted Date:     Total Responses: 0    Posted By: Dilip Kalyan Sarkar   Member Level: Diamond   Points/Cash: 3   


This program accepts the length of the three sides of triangle. A B and C determines the type of triangle.



# include
Void maib()
{
int a,b,c,x,y,z;
int TRIANGLE=0, OBTUSE=0, ACUTE=0,RIGHTANGLE=0,EQLTRI=0,ISOCLS=0;
cout<< “Enter three side of a triangle “;
cin >>a>>b>>c;

if(a>b&&a>c)
{
x=a;
y=b;
z=c;
}
else if (b>c)
{
x=b;
y=c;
z=a;
}
else
{
x=c;
y=a;
z=b;
}

TRAIANGLE=XOBTUSE=x*x>y*y+z*z; // A obtuse angled triangle is formed
ACUTE= x*xRIGHTANGLE=x*x==y*y+z*z; // A right angle triangle is formed
EQLTRI=x = = y && y = =z; // An equilateral triangle is formed
ISOCLS=x== y||y= = z|| z = = x; // An Isosceles triangle is formed

If ( TRAINGLE)
{
cout < “ Triangle is possible”;

If (RIGHTANGLE) cout << “ Right Angle triangle”; else If(OBTUSE) cout << ” Obtuse angle triangle”; else If (ACTUE)
{ cout <<” Acute angle triangle”; if (EQLTRL) cout < < “ Equilateral triangle”; else if (ISOCLS) cout <<” Isosceles triangle”; else cout << “ Scalene triangle “;
}
}
else cout << “ not a Triangle “;
}


Project Feedbacks


No feedbacks found. Be the first to respond and make money from revenue sharing program.

Post Feedback
You must Sign In to post a feedback.
Next Project: Software to add, delete and print an item in shopping list in java
Previous Project: C program to perform different operations on SINGLE LINK LIST

Return to Project Index

Post New Project


Related Projects



Advertise Here





Contact Us   Advertise   Editors    Privacy Policy    Terms Of Use   

ISC Technologies.
2006 - 2009 All Rights Reserved.