📜  当给出相反的内角时,循环四边形的外角

📅  最后修改于: 2021-04-27 09:42:56             🧑  作者: 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