fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. double k;
  6.  
  7. cout << "Enter the measure of the angle in degrees (0 < k < 180):";
  8. cin >> k;
  9.  
  10. if (k <=0 or k >= 180) {
  11. cout << "Invalid input! Angle must be between 0 and 180 degrees." << endl;
  12. }
  13. else if (k < 90) {
  14. cout << "The angle is acute." << endl;
  15. }
  16. else if (k == 90) {
  17. cout << "the angle is right." << endl;
  18. }
  19. else {
  20. cout << "The angle is obtuse." << endl;
  21. }
  22.  
  23. return 0;
  24. }
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
Enter the measure of the angle in degrees (0 < k < 180):The angle is acute.