//Amari Mosley CSC5 Chapter 4, P.220 #1
//
/**************************************************************
* 
* Determine The Maximum and Minimum
* ____________________________________________________________
* This program will determine which of two numbers is smaller, and larger.
* 
* Computation is based on the conditional operator:
*     (expression) ? value_if_true : value_if_false
* ____________________________________________________________
* INPUT 
*   num1 : First number entered by user
*   num2 : Second number entered by user
* 
* OUTPUT 
*   max  : Larger of the two numbers
*   min  : Smaller of the two numbers
* 
**************************************************************/

#include <iostream>
#include <iomanip>
using namespace std;

// Defining Main Function
int main() 
{
    // Defining double Variables
    double num1, num2, max, min;

    // Prompting user to enter two numbers
    cout << "Enter the first number: ";
    cin >> num1;
    cout << "Enter the second number: ";
    cin >> num2;

    // Determining smaller and larger using the conditional operator
    max = (num1 > num2) ? num1 : num2;
    min = (num1 < num2) ? num1 : num2;

    // Final Display
    cout << "The larger number is: " << max << endl;
    cout << "The smaller number is: " << min << endl;

    return 0;
}