给定一个圆,其弦和切线在特定点相交。给出了交替段中的角度。这里的任务是找到弦和切线之间的角度。
例子:
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
如果您希望与专家一起参加现场课程,请参阅DSA 现场工作专业课程和学生竞争性编程现场课程。