Before:
// Calculate the simple interest on a loan
int main()
{
// Variable declarations
double principal, balance, intRate, rate, interest;
// Input the principal
cout << "Enter the principal amount" << endl;
cin >> balance;
principal = balance;
// Input the interest rate
cout << "Enter the interest rate" << endl;
cin >> intRate;
rate = intRate / 100.0;
// Compute the interest
interest = principal * rate;
// Print the interest
cout << "The interest on $ " << principal
<< " is $ " << interest << endl;
return 0;
}