diff options
| author | Anibal LopezBonilla <[email protected]> | 2022-10-19 22:02:04 -0700 |
|---|---|---|
| committer | Anibal LopezBonilla <[email protected]> | 2022-10-19 22:02:04 -0700 |
| commit | d453f20f38f4d7775f7ecc1703a8adcd26c8af1e (patch) | |
| tree | 512842a0411d69e2ad5c5b4aabd4559e6699fd0e /BlankConsoleLab/BlankConsoleLab.cpp | |
| parent | Push 2 Part 2 (diff) | |
| download | cst116-lab1-lopez-bonilla-d453f20f38f4d7775f7ecc1703a8adcd26c8af1e.tar.xz cst116-lab1-lopez-bonilla-d453f20f38f4d7775f7ecc1703a8adcd26c8af1e.zip | |
Push 4
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index ce7017e..d6dde49 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -10,10 +10,14 @@ using std::cin; using std::endl; //Variables used in the programming. - float w; + float width; float length; float Area; float aspectR; + float Mass; + + float graPull; + int main() { @@ -22,11 +26,11 @@ int main() cout << "Hello welcome to the Kite App" << endl << endl; cout << "Please enter your kite's width in CM "<< endl; - cin >> w; - while (w < 1 || w > 400) + cin >> width; + while (width < 1 || width > 400) { cout << "Please enter your kite's width in CM " << endl; - cin >> w; + cin >> width; } //Enter Width and Length in centimeters @@ -40,24 +44,24 @@ int main() //Output the measures entered by user cout << "Your kite Measurements is "; - cout << w; + cout << width; cout << " By "; cout <<length << endl; //Area is calculated and converted to square meters. //Area calculation - Area = (w * length) / 2; + Area = (width * length) / 2; //Conversion calculation to square meters. Area = Area / 10000; //Output of the area calculation to square meters. cout << "The area of the kite in squre meter is "; - cout << Area; + cout << Mass; cout << " Square Meters" <<endl; - - aspectR = w / length; + //Aspect Ratio + aspectR = width / length; cout << "The aspect ratio of your kite is "; cout << aspectR << endl; @@ -66,6 +70,10 @@ int main() cout << "Keep in mind, a lower aspect ratio would provide more stability"; } + Mass = Area * 135 / 1000; + + graPull = Mass * 9.8; + cout << "Your Kite Weighs: " <<endl; } |