首页

c# 根据半径计算圆的面积和周长

c#

2020-9-13

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace 圆的周长和面积
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            double pi = 3.14;
            double B;
            double P;
            B = double.Parse(txtB.Text);
            P = 2 * pi * B;
            lblResult.Text = Convert.ToString(P);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            double pi = 3.14;
            double B;
            double P;
            B = Convert.ToDouble(txtB.Text);
            P = pi * B * B;
            lblResult.Text=Convert.ToString(P);
        }
    }
}
资源下载此资源下载价格为2D币(VIP免费),请先
资源文件列表
╘▓╡─╓▄│ñ║═├µ╗²/╘▓╡─╓▄│ñ║═├µ╗²/Form1.Designer.cs , 4767
╘▓╡─╓▄│ñ║═├µ╗²/╘▓╡─╓▄│ñ║═├µ╗²/Form1.cs , 947
╘▓╡─╓▄│ñ║═├µ╗²/╘▓╡─╓▄│ñ║═├µ╗²/Form1.resx , 5817
╘▓╡─╓▄│ñ║═├µ╗²/╘▓╡─╓▄│ñ║═├µ╗²/Program.cs , 502
╘▓╡─╓▄│ñ║═├µ╗²/╘▓╡─╓▄│ñ║═├µ╗²/Properties/AssemblyInfo.cs , 1374
╘▓╡─╓▄│ñ║═├µ╗²/╘▓╡─╓▄│ñ║═├µ╗²/Properties/Resources.Designer.cs , 2894
╘▓╡─╓▄│ñ║═├µ╗²/╘▓╡─╓▄│ñ║═├µ╗²/Properties/Resources.resx , 5612
╘▓╡─╓▄│ñ║═├µ╗²/╘▓╡─╓▄│ñ║═├µ╗²/Properties/Settings.Designer.cs , 1108
╘▓╡─╓▄│ñ║═├µ╗²/╘▓╡─╓▄│ñ║═├µ╗²/Properties/Settings.settings , 249
╘▓╡─╓▄│ñ║═├µ╗²/╘▓╡─╓▄│ñ║═├µ╗²/bin/Debug/╘▓╡─╓▄│ñ║═├µ╗².exe , 9216
╘▓╡─╓▄│ñ║═├µ╗²/╘▓╡─╓▄│ñ║═├µ╗²/bin/Debug/╘▓╡─╓▄│ñ║═├µ╗².pdb , 22016
╘▓╡─╓▄│ñ║═├µ╗²/╘▓╡─╓▄│ñ║═├µ╗²/bin/Debug/╘▓╡─╓▄│ñ║═├µ╗².vshost.exe , 11600
╘▓╡─╓▄│ñ║═├µ╗²/╘▓╡─╓▄│ñ║═├µ╗²/bin/Debug/╘▓╡─╓▄│ñ║═├µ╗².vshost.exe.manifest , 490
╘▓╡─╓▄│ñ║═├µ╗²/╘▓╡─╓▄│ñ║═├µ╗²/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache , 2164
╘▓╡─╓▄│ñ║═├µ╗²/╘▓╡─╓▄│ñ║═├µ╗²/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache , 6326
╘▓╡─╓▄│ñ║═├µ╗²/╘▓╡─╓▄│ñ║═├µ╗²/obj/x86/Debug/╘▓╡─╓▄│ñ║═├µ╗².Form1.resources , 180
╘▓╡─╓▄│ñ║═├µ╗²/╘▓╡─╓▄│ñ║═├µ╗²/obj/x86/Debug/╘▓╡─╓▄│ñ║═├µ╗².Properties.Resources.resources , 180
╘▓╡─╓▄│ñ║═├µ╗²/╘▓╡─╓▄│ñ║═├µ╗²/obj/x86/Debug/╘▓╡─╓▄│ñ║═├µ╗².csproj.FileListAbsolute.txt , 1123
╘▓╡─╓▄│ñ║═├µ╗²/╘▓╡─╓▄│ñ║═├µ╗²/obj/x86/Debug/╘▓╡─╓▄│ñ║═├µ╗².csproj.GenerateResource.Cache , 975
╘▓╡─╓▄│ñ║═├µ╗²/╘▓╡─╓▄│ñ║═├µ╗²/obj/x86/Debug/╘▓╡─╓▄│ñ║═├µ╗².exe , 9216
╘▓╡─╓▄│ñ║═├µ╗²/╘▓╡─╓▄│ñ║═├µ╗²/obj/x86/Debug/╘▓╡─╓▄│ñ║═├µ╗².pdb , 22016
╘▓╡─╓▄│ñ║═├µ╗²/╘▓╡─╓▄│ñ║═├µ╗²/╘▓╡─╓▄│ñ║═├µ╗².csproj , 3701
╘▓╡─╓▄│ñ║═├µ╗²/╘▓╡─╓▄│ñ║═├µ╗².sln , 905
╘▓╡─╓▄│ñ║═├µ╗²/╘▓╡─╓▄│ñ║═├µ╗².suo , 18432
没有账号? 忘记密码?

社交账号快速登录