Before:
// Calculates 20% tip on a restaurant check
int main()
{
// Variable declarations
float checkAmount;
long double tipPercent;
double tip;
// Input the check amount
cout << "Please enter the amount of the restaurant check" << endl;
cin >> checkAmount;
// Input the percentage tip desired
cout << "Please enter the tip percentage as a whole number" << endl;
cin >> tipPercent;
tipPercent = tipPercent / 100.0;
// Compute the tip on the amount of the check
tip = checkAmount * tipPercent;
// Print the tip
cout << "The tip on check amount of $ " << checkAmount
<< " is $ " << tip << endl;
return 0;
}