알고리즘/acmicpc
[백준][10817번] 세 수 [C언어]
장그래
2019. 3. 16. 23:48
반응형
백준 10817 세 수
- 매우 easy한 문제
- https://www.acmicpc.net/problem/10817
#include<stdio.h>
int main(void) {
int x;
int y;
int z;
int temp;
scanf("%d %d %d", &x, &y, &z);
if (x < y) {
temp = y;
y = x;
x = temp;
}
if ( y < z){
temp = z;
z = y;
y = temp;
}
if (x < y) {
temp = y;
y = x;
x = temp;
}
printf("%d", y);
}
반응형