using System; class Program { // Main Method public static void Main(String[] args) { double a = 70; double degrees = a; // converting value to radians double b = (a * (Math.PI)) / 180; // using method and displaying result Console.WriteLine("Degrees: {0} Sin: {1}", degrees, Math.Cos(b)); a = 50; degrees = a; // converting value to radians b = (a * (Math.PI)) / 180; // using method and displaying result Console.WriteLine("Degrees: {0} Sin: {1}", degrees, Math.Cos(b)); a = 73; degrees = a; // converting value to radians b = (a * (Math.PI)) / 180; // using method and displaying result Console.WriteLine("Degrees: {0} Sin: {1}", degrees, Math.Cos(b)); a = 77; degrees = a; // converting value to radians b = (a * (Math.PI)) / 180; // using method and displaying result Console.WriteLine("Degrees: {0} Sin: {1}", degrees, Math.Cos(b)); Console.Read(); } }
Output