diff options
| author | Trevor Bouchillon <[email protected]> | 2022-10-16 17:18:32 -0700 |
|---|---|---|
| committer | Trevor Bouchillon <[email protected]> | 2022-10-16 17:18:32 -0700 |
| commit | 5bbde1f775bbcebc3ed468e9faeab514eede41ca (patch) | |
| tree | 092c6ada1ddb6c43086434d169d2b1e95933e490 /BlankConsoleLab/BlankConsoleLab.cpp | |
| parent | p2 1 complete (diff) | |
| download | cst116-lab1-daboochillin-5bbde1f775bbcebc3ed468e9faeab514eede41ca.tar.xz cst116-lab1-daboochillin-5bbde1f775bbcebc3ed468e9faeab514eede41ca.zip | |
gravitational pull added
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index ba4e34c..6b95972 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -19,6 +19,8 @@ int main() float kiteaream = 0; float kiteareacm = 0; float kiteaspectratio = 0; + float kitemass = 0; + float gravitationalpull = 0; while (kitewidth < 1 || kitewidth >400) { cout << "Please enter width of kite (horizontal diagonal) in meters." << endl; @@ -41,17 +43,18 @@ int main() } } - - - - - - - cout << "Your kites length is: " << kitelength << " meters, and your kites width is: " << kitewidth << " meters." << endl; + kiteaream = (kitewidth * kitelength) / 2; kiteareacm = kiteaream / 10000; cout << "Your kites area in meters is: " << kiteaream << " meters squared." << endl; + + kitemass = kiteaream * .135; + cout << "Your kites mass is: " << kitemass << " kilograms." << endl; + + gravitationalpull = kitemass * 9.8; + cout << "The gravitational pull on your kite is: " << gravitationalpull << " Newtons. " << endl; + kiteaspectratio = kitewidth / kitelength; if (kiteaspectratio >= 1) { |