📜  给定交替线段中的角度时,弦和切线之间的角度

📅  最后修改于: 2021-05-06 17:24:07             🧑  作者: Mango

给定一个圆,其和弦与切线在特定点处交汇。给出了备用线段中的角度。这里的任务是找到弦和切线之间的角度。
例子:

Input: z = 48
Output: 48 degrees

Input: z = 64
Output: 64 degrees

方法

  • 设角度BAC为交替段中的给定角度。
  • 让,弦和圆之间的角度=角度CBY = z
  • 因为从切线中心画的线是垂直的,
  • 因此,角度OBC = 90-z
  • 如, OB = OC =圆的半径
  • 因此,角度OCB = 90-z
  • 现在,在OBC三角形中,
    角度OBC +角度OCB +角度BOC = 180
    角度BOC = 180 –(90-z)–(90-z)
    角度BOC = 2z
  • 因为圆的圆周上的角度是同一个圆弧对着的圆心的角度的一半,
    因此,角度BAC = z
  • 因此,角度BAC =角度CBY


下面是上述方法的实现:

C++
// C++ program to find the angle
// between a chord and a tangent
// when angle in the alternate segment is given
 
#include 
using namespace std;
 
void anglechordtang(int z)
{
    cout << "The angle between tangent"
         << " and the chord is "
         << z << " degrees" << endl;
}
 
// Driver code
int main()
{
    int z = 48;
    anglechordtang(z);
    return 0;
}


Java
// Java program to find the angle
// between a chord and a tangent
// when angle in the alternate segment is given
import java.io.*;
 
class GFG
{
 
    static void anglechordtang(int z)
    {
        System.out.print( "The angle between tangent"
            + " and the chord is "
            + z + " degrees");
    }
     
    // Driver code
    public static void main (String[] args)
    {
        int z = 48;
        anglechordtang(z);
    }
}
 
// This code is contributed by anuj_67..


Python3
# Python3 program to find the angle
# between a chord and a tangent
# when angle in the alternate segment is given
def anglechordtang(z):
 
    print("The angle between tangent",
          "and the chord is", z , "degrees");
 
# Driver code
z = 48;
anglechordtang(z);
 
# This code is contributed
# by Princi Singh


C#
// C# program to find the angle
// between a chord and a tangent
// when angle in the alternate segment is given
using System;
 
class GFG
{
 
    static void anglechordtang(int z)
    {
        Console.WriteLine( "The angle between tangent"
            + " and the chord is "
            + z + " degrees");
    }
     
    // Driver code
    public static void Main ()
    {
        int z = 48;
        anglechordtang(z);
    }
}
 
// This code is contributed by anuj_67..


Javascript


输出:
The angle between tangent and the chord is 48 degrees