conditional operator in cpp
#include <iostream>
int main() {
int x = 5;
int y = 10;
int result = (x > y) ? x : y;
std::cout << "The result is: " << result << std::endl;
return 0;
}
#include <iostream>
int main() {
int x = 5;
int y = 10;
int result = (x > y) ? x : y;
std::cout << "The result is: " << result << std::endl;
return 0;
}