알고리즘

[알고리즘] 백준 6840 - Who is in the middle? (C++)

blueberrysoda 2024. 9. 28. 08:47

[문제 링크] : https://www.acmicpc.net/problem/6840

#include <iostream>
#include <algorithm>
using namespace std;

int Arr[3];

int main(){
    cin >> Arr[0] >> Arr[1] >> Arr[2];
    sort(Arr, Arr+3);
    cout << Arr[1] << "\n";
    return 0;
}