Menu

M Trying Compile Simple C Script Determine Bill Pet Store Shopping Trip Ve Done Following Q43873467

I’m trying to compile a simple C++ script to determine the billfrom a pet store shopping trip, I’ve done the following but keepgetting an error… help?

// This program is for calculating pet store total bill
#include <iostream>
using namespace std;

int main()
{
   double leash, collar, food, total

       // Get the price of theleash.

       cout << “What was the costof the leash? “;
       cin >> leash;

       // Get the price of thecollar.

       cout << “What was the costof the collar? “;
       cin >> collar;

       // Get the price of the bag offood.
       cout << “What was the cost ofthe bag of food?”;
       cin >> food;

       // Calculate the total cost ofthe pet shop bill
       total = leash + collar + food;

       // Display the total cost of theshopping trip.
       cout << “Your total pet storebill comes to $” << total << endl;
       return 0;

}

Expert Answer


Answer to I’m trying to compile a simple C++ script to determine the bill from a pet store shopping trip, I’ve done the following …

OR