📜  给定相反内角时循环四边形的外角

📅  最后修改于: 2021-10-23 08:34:26             🧑  作者: Mango

给定圆内的循环四边形,任务是在给定相反的内角时找到循环四边形的外角。
例子:

Input: 48 
Output: 48 degrees

Input: 83
Output: 83 degrees

方法

  • 让,外角,角CDE = x
  • 并且,它的相反内角是角ABC
  • 因为, ADE是一条直线
  • 所以,角度ADC = (180-x) 度
  • 因为,循环四边形的对角是互补的,
  • ABC = x


下面是上述方法的实现:

C++
// C++ program to find the exterior angle
// of a cyclic quadrilateral when
// the opposite interior angle is given
 
#include 
using namespace std;
 
void angleextcycquad(int z)
{
    cout << "The exterior angle of the"
         << " cyclic quadrilateral is "
         << z << " degrees" << endl;
}
 
// Driver code
int main()
{
    int z = 48;
    angleextcycquad(z);
    return 0;
}


Java
// Java program to find the exterior angle
// of a cyclic quadrilateral when
// the opposite interior angle is given
 
import java.io.*;
 
class GFG
{
 
static void angleextcycquad(int z)
{
    System.out.print( "The exterior angle of the"
        + " cyclic quadrilateral is "
        + z +" degrees");
}
 
// Driver code
public static void main (String[] args)
{
        int z = 48;
    angleextcycquad(z);
}
}
 
// This code is contributed by anuj_67..


Python3
# Python program to find the exterior angle
# of a cyclic quadrilateral when
# the opposite interior angle is given
 
def angleextcycquad(z):
    print("The exterior angle of the",end="");
    print("cyclic quadrilateral is ",end="");
    print(z," degrees");
 
# Driver code
z = 48;
angleextcycquad(z);
 
# This code is contributed by 29AjayKumar


C#
// C# program to find the exterior angle
// of a cyclic quadrilateral when
// the opposite interior angle is given
using System;
 
class GFG
{
 
static void angleextcycquad(int z)
{
    Console.WriteLine( "The exterior angle of the"
        + " cyclic quadrilateral is "
        + z +" degrees");
}
 
// Driver code
public static void Main ()
{
        int z = 48;
    angleextcycquad(z);
}
}
 
// This code is contributed by anuj_67..


Javascript


输出:
The exterior angle of the cyclic quadrilateral is 48 degrees

如果您希望与专家一起参加现场课程,请参阅DSA 现场工作专业课程学生竞争性编程现场课程