Use function in cout
#include <iostream> using namespace std; int main() { cout << (10>20 ? 10 : 20); cout << " " << (99>88 ? 99 : 88); return 0; }