독개

[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;
}

 

 

 

 


🐱‍👓독하게 개발

블로그의 정보

독한 개발자

#독개#

활동하기