From e2ab34e60f544d9d6902fe3eb8e0947009234955 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Fri, 9 Sep 2022 15:22:01 -0600 Subject: added comments --- hw2/almondMilk.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw2/almondMilk.cpp') 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 -- cgit v1.2.3