[C++] 자료형 data type의 최대값, 최소값 구하기
by #독개##include <iostream>
#include <limits>
using namespace std;
int main()
{
int min_number = std::numeric_limits<int>::lowest();
int max_number = std::numeric_limits<int>::max();
cout << "int의 최대값 " << max_number << endl;
cout << "int의 최소값 " << min_number << endl;
return 0;
}
🐱👓독하게 개발
'🔥 프로그래밍 학습 > C++' 카테고리의 다른 글
[C++] 6.18 void 포인터 , generic 포인터 (0) | 2022.11.16 |
---|---|
[C++] 6.17 For-each 반복문 (0) | 2022.11.16 |
[C++] 6.16 포인터와 참조의 맴버 선택 (0) | 2022.11.16 |
[C++] 6.15 참조 const / refercence const (0) | 2022.11.16 |
[C++] 6.14 참조변수 reference variable (0) | 2022.11.16 |
블로그의 정보
독한 개발자
#독개#