summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/BlankConsoleLab.cpp
diff options
context:
space:
mode:
authorJoe Traver <[email protected]>2022-10-18 20:27:23 -0700
committerJoe Traver <[email protected]>2022-10-18 20:27:23 -0700
commit9f98e2dc7c8257c986b98a2ffcb1b55ac25f8638 (patch)
tree6fad009853e77ac264ca2abe4569c995e3f66c54 /BlankConsoleLab/BlankConsoleLab.cpp
parentStep 3 Complete (diff)
downloadcst116-lab1-joetraver30-9f98e2dc7c8257c986b98a2ffcb1b55ac25f8638.tar.xz
cst116-lab1-joetraver30-9f98e2dc7c8257c986b98a2ffcb1b55ac25f8638.zip
Completed Step 4, added program notes and changed area and meters vars to float to accommodate the decimal valuse
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp
index 505dbf4..42d6d35 100644
--- a/BlankConsoleLab/BlankConsoleLab.cpp
+++ b/BlankConsoleLab/BlankConsoleLab.cpp
@@ -13,7 +13,8 @@ int main()
{
int height;
int width;
- int area;
+ float area;
+ float meters;
cout << "Enter height of kite in cm: ";
@@ -26,8 +27,13 @@ int main()
cout << "Height = " << height << " cm" << endl;
cout << "Width = " << width << " cm" << endl;
-
+
+
+// area calculation
area = (height * width) / 2;
+// unit conversion
+ meters = area / 10000;
+
}