#include <iostream>
usingnamespace std;
int main() //start of main function
{
int percent; //input: discount percentage
float percentAsFraction, //input: discount percentage conversion
listPrice, //input: list price
salePrice, //output: sale price
discount; //output: savings
//Get the list price and discount percentage.
cout << "Enter item price and discount percentage:";
cin >> listPrice >> percent;
//Conversions and computations
percentAsFraction = percent / 100.00;
discount = listPrice * percentAsFraction;
salePrice = listPrice - discount;
//Display sale price and savings
cout << "The sale price is " << salePrice << " and the savings are " << discount << endl;
return 0; //Exit main function
}