Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do this in C++ General Crates has found that the updated cost per cubic foot for storage is now 0.3, due to economic fluctuations.

Please do this in C++

General Crates has found that the updated cost per cubic foot for storage is now 0.3, due to economic fluctuations. Management has determined that they cannot currently raise their charge per cubic foot above 0.52 without losing customers. Modify the program to match these new conditions. (Required improvements: print all money amounts with two decimal places.) Use the attached pictures as a base for the question.

image text in transcribed

image text in transcribed

image text in transcribed

The Program (1 of 3) 1 4 5 6 // This program is used by General Crates, Inc. to calculate // the volume, cost, customer charge, and profit of a crate // of any size. It calculates this data from user input, which // consists of the dimensions of the crate. #include #include using namespace std; 9 10 int main() { // Constants for cost and amount charged const double COST_PER_CUBIC_FOOT = 0.23; const double CHARGE_PER_CUBIC_FOOT = 0.5; // Variables double length, // The crate's length width, // The crate's width height, // The crate's height volume, // The volume of the crate cost, // The cost to build the crate charge, // The customer charge for the crate profit; // The profit made on the crate // Set the desired output formatting for numbers. cout > length; cout > width; cout > height; o00o W NOON // Calculate the crate's volume, the cost to produce it, // the charge to the customer, and the profit. volume = length * width * height; cost = volume * COST PER CUBIC FOOT; charge = volume * CHARGE PER CUBIC_FOOT; profit = charge - cost; // Display the calculated data. cout

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_2

Step: 3

blur-text-image_3

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

Microsoft Visual Basic 2005 For Windows Mobile Web Office And Database Applications Comprehensive

Authors: Gary B. Shelly, Thomas J. Cashman, Corinne Hoisington

1st Edition

0619254823, 978-0619254827

More Books

Students also viewed these Databases questions

Question

state what is meant by the term performance management

Answered: 1 week ago