diff options
| author | Joe Traver <[email protected]> | 2022-10-18 20:27:23 -0700 |
|---|---|---|
| committer | Joe Traver <[email protected]> | 2022-10-18 20:27:23 -0700 |
| commit | 9f98e2dc7c8257c986b98a2ffcb1b55ac25f8638 (patch) | |
| tree | 6fad009853e77ac264ca2abe4569c995e3f66c54 /BlankConsoleLab/BlankConsoleLab.cpp | |
| parent | Step 3 Complete (diff) | |
| download | cst116-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.cpp | 10 |
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; + } |