An angle is considered acute if it is less than 90 degrees, obtuse if it is greater than 90 degrees, and a right angle if it is equal to 90 degrees. Using this information, write a C++ program that accepts an angle, in degrees, and displays the type of angle corresponding to the degrees entered.
1
Expert's answer
2013-03-12T12:09:24-0400
/*An angle is considered acute if it is less than 90 degrees, obtuse if it is greater than 90 degrees, and a right angle if it is equal to 90 degrees. Using this information, write a C++ program that accepts an angle, in degrees, and displays the type of angle corresponding to the degrees entered.*/ # include <iostream>
using namespace std;
int main(){ cout<<"Enter degrees:"; double d//degrees; cin>>d; if (d<90) cout<<"acute"; if (d==90) cout<<"right";
if (d>90) cout<<"obtuse"; cout<<" angle\n"; system("PAUSE"); return 0; }
Comments
Leave a comment