弧度角度换算

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication4
{
    class Program
    {
        static void Main(string[] args)
        {
            double n, k, p, s,PI=3.14;
            int d, m;
            Console.Write("请输入一个弧度制:");
            n=double.Parse(Console.ReadLine());
            Console.WriteLine("弧度值为:{0}",n);
            k = n * 180 / PI;
            d = (int)k;
            p = (k - d) * 60;
            m = (int)p;
            s = (p - m) * 60;
            Console.WriteLine("角度制为{0}度{1}分{2}秒",d,m,s);
            Console.ReadLine();
        }
    }
}
原文地址:https://www.cnblogs.com/dj1232090/p/10062657.html