zoukankan      html  css  js  c++  java
  • C#实战-圆半径

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    
    
    namespace PI
    {
        class Program
        {
            static void Main(string[] args)
            {
                const Double PI=3.1415926;
                Console.WriteLine("请输入圆的半径:");
                float r = Convert.ToInt32(Console.ReadLine());
                double s =PI * (r * r);
                Console.WriteLine("圆的半径是{0},面积是:{1}",r,s.ToString("0.000"));//限制输出的位数
                Console.ReadKey();
            }
        }
    }
  • 相关阅读:
    重装Win10系统的非常简单的操作教程
    Python
    Delphi
    Libs
    Windows Server
    Windows Server
    Delphi
    Delphi
    Delphi
    Delphi
  • 原文地址:https://www.cnblogs.com/releed/p/5447634.html
Copyright © 2011-2022 走看看