Computer Science, asked by Dys, 1 year ago

write a program to input two angles calculate and display whether they are complementary or supplementary and if they are complementary angle then calculate sign value of the angle otherwise cos value of the angle?


IndieLov: sine or sign? because they're different

Answers

Answered by IndieLov
1
It's a c# program.


using System;namespace WorkSpace
{
    class Program
    {
        static void Main()
        {
            Console.WriteLine("Angles:");
            int Angle1 = Int32.Parse(Console.ReadLine());
            int Angle2 = Int32.Parse(Console.ReadLine());            if (Angle1 + Angle2 == 90)
            {
                Console.WriteLine("They're complementary.");
                Console.WriteLine("And Their sine is " + (Math.Sin(Angle1 + Angle2)));
            }
            else
                Console.WriteLine("They're not complementary.");            Console.ReadLine();
        }
    }
}
Similar questions