Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm trying to compile a simple C++ script to determine the bill from a pet store shopping trip, I've done the following but keep getting

I'm trying to compile a simple C++ script to determine the bill from a pet store shopping trip, I've done the following but keep getting an error... help?

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

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

// Get the price of the leash.

cout << "What was the cost of the leash? "; cin >> leash;

// Get the price of the collar.

cout << "What was the cost of the collar? "; cin >> collar;

// Get the price of the bag of food. cout << "What was the cost of the bag of food?"; cin >> food;

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

// Display the total cost of the shopping trip. cout << "Your total pet store bill comes to $" << total << endl; return 0;

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems For Advanced Applications 18th International Conference Dasfaa 2013 Wuhan China April 22 25 2013 Proceedings Part 2 Lncs 7826

Authors: Weiyi Meng ,Ling Feng ,Stephane Bressan ,Werner Winiwarter ,Wei Song

2013th Edition

3642374492, 978-3642374494

More Books

Students also viewed these Databases questions

Question

1. What is Ebola ? 2.Heart is a muscle? 3. Artificial lighting?

Answered: 1 week ago