summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdwardFine <[email protected]>2022-10-19 09:45:17 -0700
committerEdwardFine <[email protected]>2022-10-19 09:45:17 -0700
commit65877c35716fbdded7a3b550315c94269707e881 (patch)
tree74e6b5077a3ca0261090171cba9b6cbc9b2ed3b1
parentCalculate Gravitational pull and display it in console (diff)
downloadcst116-lab1-edwardfine-65877c35716fbdded7a3b550315c94269707e881.tar.xz
cst116-lab1-edwardfine-65877c35716fbdded7a3b550315c94269707e881.zip
Revert "Calculate Gravitational pull and display it in console"
This reverts commit 8514566f17bde07d7a7753cb59256f13aa687845.
-rw-r--r--BlankConsoleLab/BlankConsoleLab.vcxproj1
-rw-r--r--BlankConsoleLab/CST116-Lab1-Fine.cpp16
2 files changed, 1 insertions, 16 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.vcxproj b/BlankConsoleLab/BlankConsoleLab.vcxproj
index c58d92a..649a51e 100644
--- a/BlankConsoleLab/BlankConsoleLab.vcxproj
+++ b/BlankConsoleLab/BlankConsoleLab.vcxproj
@@ -24,7 +24,6 @@
<ProjectGuid>{3cecade6-3e15-4852-bd24-65bfe5d3a3aa}</ProjectGuid>
<RootNamespace>BlankConsoleLab</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
- <ProjectName>Cst116-Lab1-EdwardFine</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
diff --git a/BlankConsoleLab/CST116-Lab1-Fine.cpp b/BlankConsoleLab/CST116-Lab1-Fine.cpp
index e437a83..5937c04 100644
--- a/BlankConsoleLab/CST116-Lab1-Fine.cpp
+++ b/BlankConsoleLab/CST116-Lab1-Fine.cpp
@@ -2,17 +2,12 @@
//
#include <iostream>
-#include <math.h>
using namespace std;
-using std::pow;
float GetArea(float length, float width);
float getMass(float area);
-float getGrav(float mass);
const int massMeter = 135;
-const int gravConst = 6674300;
-const int earthMass = 59720000;
using std::cout;
using std::cin;
using std::endl;
@@ -26,7 +21,6 @@ int main()
float aspectRatio;
int goodRatio = 0;
float mass;
- float gravPull;
while (goodRatio == 0) {
while (correct == 0) {
cout << "Please provide dimensions for your kite between 1 and 400 centimeters." << endl;
@@ -59,9 +53,7 @@ int main()
}
}
mass = getMass(area);
- cout << "You kite has a mass of " << mass << " kilograms." << endl;
- gravPull = getGrav(mass);
- cout << "Your kite has a gravitational pull to the Earth of " << gravPull << "N at 200 m in the sky." <<endl;
+ cout << "You kite has a mass of " << mass << "grams." << endl;
}
float GetArea(float length, float width) {
float area = 0;
@@ -72,13 +64,7 @@ float GetArea(float length, float width) {
float getMass(float area) {
float mass = 0;
mass = area * massMeter;
- mass = mass / 1000;
return mass;
}
-float getGrav(float mass) {
- float gravPull = 0;
- gravPull = gravConst * ((mass * earthMass) / 200);
- return gravPull;
-}