• Home
  • About
    • Jiwon Jeong photo

      Jiwon Jeong

      끊임없이 배우며 성장하는 엔지니어

    • Learn More
    • Email
    • Github
  • Posts
    • All Posts
    • All Tags
    • All Categories
  • Projects

구현 및 시뮬레이션

13 May 2021

Reading time ~1 minute

최대값 최소값 문제

#include<iostream>
#include<algorithm>
using namespace std;
 
int main(void)
{
    cout << "[1] min, max 예제 기본" << endl << endl;
    cout << "min(1, 2)       : " << min(1, 2) << endl;
    cout << "min(2, 2)       : " << min(1, 2) << endl;
    cout << "min('b', 'd')   : " << min('b', 'd') << endl;
    cout << "min(34.5, 12.3) : " << min(34.5, 12.3) << endl << endl;
    
    cout << "max(1, 2)       : " << max(1, 2) << endl;
    cout << "max(2, 2)       : " << max(1, 2) << endl;
    cout << "max('b', 'd')   : " << max('b', 'd') << endl;
    cout << "max(34.5, 12.3) : " << max(34.5, 12.3) << endl;
    return 0;
}




Algorithm Share Tweet +1