C/C++
hacker_G
the F world
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
C/C++ 保留N位小数
保留N位小数方法一:使用fixed和setprecision#include <iostream>#include <iomanip> //需要包含此头文件using namespace std;int main(){ double x=3.1415926; int N=3; cout <<fixed<<s...原创 2018-08-08 11:53:46 · 5870 阅读 · 0 评论 -
C++寻找数组最大值和最小值
C++里面有好多自带函数可以直接用,比如寻找数组中的最大最小值其实是有函数的,如下#include <iostream>using namespace std;#include <algorithm>int main() { int n; cin >> n; int *p = new int[n]; for (int i = 0; i&l...原创 2018-08-13 13:52:42 · 30888 阅读 · 1 评论
分享