//******************************************************************* // // Program: Account Update // // Author: Robert Rosebrugh, rrosebrugh@mta.ca // // Description: Computes account balance as result of withdrawal // // Date: 1999/9/24 // // Course Information: CS 1711, Section B, Class Example // // Filename: account.cpp // //******************************************************************* #include void main() { double accountBalance, // the balance of the account withdrawAmount, // amount of withdrawal newAccountBalance; // new balance - difference of previous two // get input values cout << "Input account balance and withdrawal amount>" << endl; cin >> accountBalance >> withdrawAmount; // compute new balance newAccountBalance = accountBalance - withdrawAmount; // output results cout << endl; cout << "New account balance: $" << newAccountBalance << endl; }