Saturday, May 4, 2013

Write s program to find the given angle is acute or obtuse or rightangle in C++

Algorithm

1  : Integer angle.
2  : Print''Enter  the angle''
3  : Input angle
4  : If angle(<90)
          Print''angle is acute''
      If(angle>90)
          Print''The angle is obtuse''
      If (angle ==90)
          Print''The angle is right angle''
5  : Stop





#include<iostrem.h>
#include<conio.h>
void main()
{
clrscr();
int angle;
cout<<''\n Enter the angle'';
cin>>angle;
if(angle<90)
 cout''\n The given angle is obtuse'';
if(angle >90)
 cout<<''\n The given angle is Obtuse'';
if(angle==90)
cout<<''\n The given Angle is Right angle'';
}



OUTPUT  

Enter the angle 45


The given angle is Acute

Enter the angle  90

The given angle is Right angle

No comments:

Post a Comment