From 5bbde1f775bbcebc3ed468e9faeab514eede41ca Mon Sep 17 00:00:00 2001 From: Trevor Bouchillon Date: Sun, 16 Oct 2022 17:18:32 -0700 Subject: gravitational pull added --- BlankConsoleLab/BlankConsoleLab.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'BlankConsoleLab/BlankConsoleLab.cpp') 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) { -- cgit v1.2.3