Write a C# Sharp program to find the sum of the interior angles (in degrees) of a given Polygon. Input number of straight line(s)
- برمجة سي شارب
- برمجة
- 2021-05-15
- MarwaMohammed
الأجوبة
using System;
namespace exercises
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Input number of straight lines of the polygon:");
int n = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Sum of the interior angles (in degrees) of the said polygon: " + test(n));
}
public static int test(int num)
{
return 180 * (num - 2);
}
}
}أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال