// // Example 5.2. Program to read a product's price and // quantity sold and to display the total price // #include #include using namespace std; int main() { float price; // price of product int quantity; // quantity of product sold cout << "Enter the price: "; cin >> price; cout << "Enter the quantity sold: "; cin >> quantity; cout << "The total price is $" << setprecision(2) << showpoint << fixed << price * quantity << endl; return 0; }