//OrinTill Qimid CS1A Chapter 3, P. 146, #15
//
/**************************************************************
 * Addition of random number 
 * 
 * ____________________________________________________________
 * This program generates two random numbers, displays them in an addition format, and waits for the user to press the Enter key before showing the result of the addition.
 * ____________________________________________________________
 * INPUT
 * enter: any that the user press.
 *
 * OUTPUT
 * number1 : random number1
 * number2 : random number2
 * total : total of the 2 random number
 *
 **************************************************************/
#include <iostream>
#include <iomanip>
#include <cmath>
#include <cstdlib> 
using namespace std;

int main() 
{
    float number1,
    number2,
    total;
    number1 = rand();
    number2 = rand();
    cout <<"     " << number1 << endl; // Display the numbers
    cout <<"+" << "    _____"<< endl;
    cout <<"     "<< number2 << endl;
    cout<<"press any key to see the answer."<< endl; // Wait for the user to press Enter
    cin.get();
    total = number1 + number2;  // Calculate the total
    cout <<"     " << number1 << endl;  // Display the result
    cout <<"     "<< number2 << endl;
    cout <<"+" << "    _____"<< endl;
    cout <<"     " << total<< endl;

	return 0;
}