// Finds the largest value of two numbers. // demonstrates conditional assignment // Mikhail Nesterenko // 10/14/2015 #include using std::cout; using std::cin; using std::endl; int main() { // read in the two numbers int n1, n2; cout << "Please enter two numbers: "; cin >> n1 >> n2; // find the largest value const int largest = n1 > n2 ? n1 : n2; // print the largest value out cout << "Largest number of the two is: " << largest << endl; }