C#求圆的周长、面积、体积
窗体应用程序
private void button1_Click(object sender, EventArgs e)
{
double r;
r = Convert.ToInt32(textBox1.Text);
textBox2.Text = Convert.ToString(2 * r * System.Math.PI);
textBox3.Text = Convert.ToString(r * r * System.Math.PI);
textBox4.Text = Convert.ToString(r * r * r * 4 / 3 * System.Math.PI);
}
C#求圆的周长、面积、体积的更多相关文章
- c++-面向对象类的示例-求周长面积,判断体积相等-文件操作和一般操作
面向对象编程示例:求周长和面积 #define _CRT_SECURE_NO_WARNINGS #include <iostream> using namespace std; //圆的周 ...
- python脚本1_给一个半径求圆的面积和周长
#给一个半径,求圆的面积和周长,圆周率3.14 r = int(input('r=')) print('area='+str(3.14*r*r)) print('circumference='+str ...
- JAVA求圆的面积
import java.text.DecimalFormat;import java.util.Scanner; public class TheAreaOfCircle { public stati ...
- Java作业 输入圆的半径计算输出圆的周长和面积
package text1; import java.util.Scanner; public class text11 { public static void main(String[] args ...
- POJ 2546 & ZOJ 1597 Circular Area(求两圆相交的面积 模板)
题目链接: POJ:http://poj.org/problem? id=2546 ZOJ:problemId=597" target="_blank">http: ...
- YTU 2723: 默认参数--求圆的面积
2723: 默认参数--求圆的面积 时间限制: 1 Sec 内存限制: 128 MB 提交: 206 解决: 150 题目描述 根据半径r求圆的面积, 如果不指定小数位数,输出结果默认保留两位小数 ...
- 【C语言】输入圆的半径,求解圆的周长和面积
公式: C=2πr S=πr² 代码: #include<stdio.h> int main() { float r,PI; PI = 3.14159; printf("请输入圆 ...
- hdu 5120 (求两圆相交的面积
题意:告诉你两个圆环,求圆环相交的面积. /* gyt Live up to every day */ #include<cstdio> #include<cmath> #in ...
- HDU 4667 Building Fence(求凸包的周长)
A - Building Fence Time Limit:1000MS Memory Limit:65535KB 64bit IO Format:%I64d & %I64u ...
随机推荐
- Package md5 implements the MD5 hash algorithm as defined in RFC 1321 base64
https://golang.google.cn/pkg/crypto/md5/ Go by Example 中文:Base64编码 https://books.studygolang.com/gob ...
- mysql 修改语法格式
1.修改字段注释格式 alter table {table} modify column {column} {type} comment '{comment}';
- 【网络基础系列二】BOOTP、DHCP协议
BOOTP 含义:BOOT Protocol,引导协议 作用:引导无盘计算机或者第一次启动的计算机获取以下网络配置信息: 主机的IP地址.子网掩码 路由器(网关)的IP地址 DNS服务器IP地址 C/ ...
- 03-树2 List Leaves(25 point(s)) 【Tree】
03-树2 List Leaves(25 point(s)) Given a tree, you are supposed to list all the leaves in the order of ...
- Android Weekly Notes Issue #241
Android Weekly Issue #241 January 22nd, 2017 Android Weekly Issue #241 本期内容包括: 经典导航模式Master/Detail的设 ...
- Windows程序设计(1)——Win32运行原理(二)
创建进程 1 进程和线程 2 应用程序的启动过程 3 CreateProcess函数 4 实例 3 创建进程 3.1 进程和线程 进程通常被定义为一个存在运行的程序的实例.进程是一个正在运行的程序,它 ...
- Appium基础——one demo
启动模拟器,启动appium android avd启动模拟器管理 选择一个版本启动 安装appium-client 直接pip install appium-python-client安装 ...
- CentOS系统文件和目录管理相关的一些重要命令
我们都知道,在Linux系统中,基本上任何我们需要做的事都可以通过输入命令来完成,所以在Linux系统中命令非常的多,我们不可能也没必要记住所有的这些命令,但是对于一些常用的命令我们还是必须要对其了如 ...
- IOS微信禁用分享跳转页面返回BUG修复
fresh(); function fresh() { let isPageHide = false; window.addEventListener('pageshow', function () ...
- c/c++生成预编译文件
Preprocesses C and C++ source files and writes the preprocessed output to a file. /P Remarks The f ...