diff options
| author | TheOtherTonyStark <[email protected]> | 2022-10-16 17:10:52 -0700 |
|---|---|---|
| committer | TheOtherTonyStark <[email protected]> | 2022-10-16 17:10:52 -0700 |
| commit | e3430c6c2c776850df1f573633700b786c5a525c (patch) | |
| tree | 69f65b34f781862500f5d8f01b4bded96af898bf /BlankConsoleLab/CST116-Lab1-Chambers.cpp | |
| parent | Second Commit (diff) | |
| download | cst116-lab1-theothertonystark-e3430c6c2c776850df1f573633700b786c5a525c.tar.xz cst116-lab1-theothertonystark-e3430c6c2c776850df1f573633700b786c5a525c.zip | |
Third Commit
Diffstat (limited to 'BlankConsoleLab/CST116-Lab1-Chambers.cpp')
| -rw-r--r-- | BlankConsoleLab/CST116-Lab1-Chambers.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/BlankConsoleLab/CST116-Lab1-Chambers.cpp b/BlankConsoleLab/CST116-Lab1-Chambers.cpp index 82c1e87..71d2643 100644 --- a/BlankConsoleLab/CST116-Lab1-Chambers.cpp +++ b/BlankConsoleLab/CST116-Lab1-Chambers.cpp @@ -2,12 +2,14 @@ // #include <iostream> +#include <iomanip> using namespace std; using std::cout; using std::cin; using std::endl; +using std::setprecision; //Ask the user for the width and length in centimeters. //Print what the user entered for the width and length. @@ -19,11 +21,13 @@ using std::endl; int width; int length; -int kitearea(); +int area; +int sqmarea; +int aspectratio; int main() { - + cout << "Insert Kite width: " ; cin >> width ; @@ -32,13 +36,13 @@ int main() cout << "Our kite has a width of " << width << " and a length of " << length << " both measured in cm." ; -} -int kitearea() -{ - int area = width * length; - cout << "Our kite was an area of " << area << " in cm^2."; + cout << " Our kite was an area of " << area << " in cm^2."; + + int sqmarea = area / 10000; + + cout << " Our area in square meters is " << sqmarea; } |