#include <iostream> using namespace std; bool esDecreciente(int a, int b, int c) { if( a >= b && b >= c ) // decreciente débil { return true; } else { return false; } } bool esCreciente(int a, int b, int c) { if( a <= b && b <= c ) // creciente débil { return true; } else { return false; } } int main() { int a,b,c; cin >> a >> b >> c; if( esDecreciente(a,b,c) && esCreciente(a,b,c)) // decreciente débil { cout << "I"; } else { if( esDecreciente(a,b,c) ) { cout << "D"; } else { if( esCreciente(a,b,c) ) { cout << "C"; } else { cout << "X"; } } } return 0; }
Comentarios
Publicar un comentario