Identify Type of Angle: Acute, Right, Obtuse

Explanation:

  1. Input:
    • The program prompts the user to enter an angle in degrees.
  2. Switch Statement:
    • The switch statement checks the value of angle:
      • case 0 ... 89: Matches any angle between 0 and 89 degrees. The program identifies this as an acute angle.
      • case 90: Matches exactly 90 degrees, identifying it as a right angle.
      • case 91 ... 179: Matches any angle between 91 and 179 degrees, identifying it as an obtuse angle.
      • default: Handles any input outside the valid range (0-180 degrees) by displaying an error message.
  3. Output:
    • The program prints whether the entered angle is acute, right, or obtuse based on the value provided.

Example Outputs:

Example 1: Acute Angle Input:
  • Angle: 45
Output: Example 2: Right Angle Input:
  • Angle: 90
Output: Example 3: Obtuse Angle Input:
  • Angle: 120
Output: Example 4: Invalid Angle Input:
  • Angle: 200
Output:  
All Copyrights Reserved 2025 Reserved by T4Tutorials