configure,Makefile
-Wall 显示所有 -w 不显示warning
我的博客即将同步至腾讯云开发者社区,邀请大家一同入驻:https://cloud.tencent.com/developer/support-plan?invite_code=22tp3hucq77ok
-Wall 显示所有 -w 不显示warning
我的博客即将同步至腾讯云开发者社区,邀请大家一同入驻:https://cloud.tencent.com/developer/support-plan?invite_code=22tp3hucq77ok
很多时候需要对文件、文件夹进行批量处理 如果直接使用递归 -R 来做的话,一般就无法区分文件和文件夹
使用find就可以根据需要自由的查找并进行进一步处理
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 744 {} \;
这个排序在网上直接搜索的结果有这样一个:
array_multisort(array_column($array,'sort'),SORT_ASC,$array);
这个是错误的。 切忌不要以讹传讹了。
实际上array_multisort 是PHP内置的方法,官方有说明: PHP - array_multisort
题中给出的r、h在最后的答案中无意义
球的体积 V = 4/3 Pi r^3 球的表面积 S = 4 Pi r^2
体积公式推导和论证 : https://www.zhihu.com/question/405287938
#include <iostream>
#include <iomanip>
using namespace std;
const float PI = 3.1415926;
int main(){
float r,h;
cout << "请依次输入半径和圆柱体高度." << endl;
cin >> r >> h;
// cout << setpreise(2) << setfixed;
cout << setiosflags( ios::fixed ) << setiosflags( ios::right ) << setprecission( 2 );
cout << "\n周长:" << 2*PI*r;
cout << "\n面积:" << PI*r*r;
cout << "\n圆球表面积:" << 4 * PI * r * r;
cout << "\n球的体积:" << 4.0 / 3.0 * PI * r * r *r;
cout << "\n圆柱体体积:" << PI*r*r*h;
cout << endl;
return 0;
}
最近回复