summaryrefslogtreecommitdiff
path: root/hw2/almondMilk.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'hw2/almondMilk.cpp')
-rw-r--r--hw2/almondMilk.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw2/almondMilk.cpp b/hw2/almondMilk.cpp
index 77bc61e..ffe3bf6 100644
--- a/hw2/almondMilk.cpp
+++ b/hw2/almondMilk.cpp
@@ -12,12 +12,12 @@ int main() {
double side_len = 0;
double height = 0;
double volume = 0;
-
+ // User input
cout << "What is the side length of the base of the carton in inches?\n";
cin >> side_len;
cout << "What is the height of the carton in inches?\n";
cin >> height;
- volume = (side_len*side_len)*height*0.55;
+ volume = (side_len*side_len)*height*0.55; // Calculate and convert to ounces
cout << "The carton has a volume of " << fixed << setprecision(1) << volume<<" ounces.";
return 0;
} \ No newline at end of file