-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path4.11-5.cpp
21 lines (20 loc) · 1.23 KB
/
4.11-5.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>
#include <limits>
int main() {
std::cout << "min char: " << int(std::numeric_limits<char>::min())
<< ", max char: " << int(std::numeric_limits<char>::max()) << "\n"
<< "min short: " << std::numeric_limits<short>::min()
<< ", max short: " << std::numeric_limits<short>::max() << "\n"
<< "min int: " << std::numeric_limits<int>::min()
<< ", max int: " << std::numeric_limits<int>::max() << "\n"
<< "min long: " << std::numeric_limits<long>::min()
<< ", max long: " << std::numeric_limits<long>::max() << "\n"
<< "min float: " << std::numeric_limits<float>::min()
<< ", max float: " << std::numeric_limits<float>::max() << "\n"
<< "min double: " << std::numeric_limits<double>::min()
<< ", max double: " << std::numeric_limits<double>::max() << "\n"
<< "min long double: " << std::numeric_limits<long double>::min()
<< ", max long double: " << std::numeric_limits<long double>::max() << "\n"
<< "min unsigned: " << std::numeric_limits<unsigned>::min()
<< ", max unsigned: " << std::numeric_limits<unsigned>::max() << "\n";
}