“蓝桥杯”练习系统 - 入门训练 - 圆的面积
作者:互联网
思路:
求圆的面积: S = PI * r2. 题目已给 PI = atan(1.0) * 4 或 PI=3.14159265358979323.
1 #include <iostream> 2 #include <cstdio> 3 #include <cmath> 4 using namespace std; 5 6 const double PI = atan(1.0)*4; 7 8 int main() 9 { 10 ios::sync_with_stdio(false); 11 cin.tie(0); 12 13 int r; 14 cin >> r; 15 printf("%.7f\n", PI * r * r); 16 17 return 0; 18 }
标签:include,1.0,入门,atan,int,练习,cin,蓝桥,PI 来源: https://www.cnblogs.com/AntonLiu/p/12246691.html