You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
568 B
29 lines
568 B
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
int main() {
|
|
ios::sync_with_stdio(false); //读入输出优化的强迫症
|
|
int n = 1;
|
|
int n_1 = 0;
|
|
//求最大整数值:2147483647
|
|
while (n > 0) {
|
|
n++;
|
|
n_1++;
|
|
}
|
|
cout << n_1 << endl;
|
|
|
|
//求最小整数值:-2147483648
|
|
n = -1;
|
|
n_1 = 0;
|
|
while (n < 0) {
|
|
n--;
|
|
n_1--;
|
|
}
|
|
cout << n_1 << endl;
|
|
|
|
//double 型浮点数能精确到多少位小数:0.33333333333333331483
|
|
double i = 1.0, j = 3.0;
|
|
printf("%.20lf\n", i / j);
|
|
return 0;
|
|
} |