1438 [CA1002]Circle
来源:互联网 发布:林肯mac 编辑:程序博客网 时间:2024/06/06 05:21
Description
Given a circle with radius R, please calculate the area of this circle.
Input
The input contains a real number R(0.1 <= R <= 100)
Output
Output the area of the circle in a line. The answer should be rounded to 8 digits after the decimal point.
Sample Input
0.564189583547
Sample Output
1.00000000
Hint
you can assume PI = 3.14159265358979
Submission
answer.cpp
#include<iostream>#include<iomanip>using namespace std;int main(){ double R; cin>>R; cout<<setprecision(8)<<fixed<<3.14159265358979*R*R<<endl; return 0;}
Standard Answer
answer.cpp
#include <iostream>#include <iomanip>using namespace std;const double PI = 3.14159265358979;int main(){ double r; cin >> r; cout << fixed << setprecision(8) << r * r * PI << endl; return 0;}
阅读全文
0 0
- 1438 [CA1002]Circle
- circle ``
- Circle
- circle
- circle pendants
- Circle ZOj3321
- Circle类
- Circle
- SGU130-circle
- Circle类
- SGU130 Circle
- 自定义circle
- sgu130:Circle
- sdut2878----Circle
- pygame_draw circle
- SGU130 Circle
- Circle Line
- Circle弧度
- ubuntu14.04下Qt5.8的安装
- Java关键词解读之abstract
- Linux设备驱动之Hotplug_uevent机制
- 1002. 写出这个数 (20)
- Hadoop遇坑填坑汇总
- 1438 [CA1002]Circle
- workbench导出mysql5.6数据出错
- 链表操作
- Java中内部类可以被覆盖吗
- 未能加载文件或程序集 ICSharpCode.SharpZipLib
- poj 2240 Arbitrage
- Scala使用SimpleDateFormat出现线程安全问题的解决办法
- Electronic commerce
- Boost库学习