algorithm
더블릿|dovelet - 2번째 계단 - 음표/coci_note
블루건
2016. 7. 22. 18:41
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #include <iostream> using namespace std; int main() { int a, b, c, d, e, f, g, h; cin >> a >> b >> c >> d >> e >> f >> g >> h; if (a < b && b < c && c < d && d < e && e < f && f < g && g < h) cout << "ascending"; else if (a > b && b > c && c > d && d > e && e > f && f > g && g > h) cout << "descending"; else cout << "mixed"; return 0; } | cs |