summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMusa Ahmed <[email protected]>2022-10-19 17:28:56 -0700
committerMusa Ahmed <[email protected]>2022-10-19 17:28:56 -0700
commit32b89491793163a8396f025b4ef40befdfe2fdb3 (patch)
tree8a7dfa5f0c4442e9dbf3c942afb9d9599d817e8b
parentAdded Pseudocode (diff)
downloadcst116-lab1-m005a-32b89491793163a8396f025b4ef40befdfe2fdb3.tar.xz
cst116-lab1-m005a-32b89491793163a8396f025b4ef40befdfe2fdb3.zip
Added output file
-rw-r--r--cst116-lab1-Ahmed/cst116-lab1-Ahmed-output.txt28
-rw-r--r--cst116-lab1-Ahmed/cst116-lab1-Ahmed.cpp5
-rw-r--r--cst116-lab1-Ahmed/cst116-lab1-Ahmed.vcxproj1
-rw-r--r--cst116-lab1-Ahmed/cst116-lab1-Ahmed.vcxproj.filters3
4 files changed, 35 insertions, 2 deletions
diff --git a/cst116-lab1-Ahmed/cst116-lab1-Ahmed-output.txt b/cst116-lab1-Ahmed/cst116-lab1-Ahmed-output.txt
new file mode 100644
index 0000000..045216d
--- /dev/null
+++ b/cst116-lab1-Ahmed/cst116-lab1-Ahmed-output.txt
@@ -0,0 +1,28 @@
+Enter width (In centimeters):
+4012
+Enter length (In centimeters):
+12
+Please keep the width and length between 1 and 400 centimeters
+Enter width (In centimeters):
+45
+Enter length (In centimeters):
+15
+You entered: 45 cm for width, and: 15 cm for length
+The area for your kite is: 0.03375 square meters
+The mass of your kite is: 0.00455625 kg
+The gravitional pull of your kite is: 0.0446513 Newtons
+Warning, an aspect ratio of: 3 is too high and will provide instability, Try Again
+
+Enter width (In centimeters):
+15
+Enter length (In centimeters):
+20
+You entered: 15 cm for width, and: 20 cm for length
+The area for your kite is: 0.015 square meters
+The mass of your kite is: 0.002025 kg
+The gravitional pull of your kite is: 0.019845 Newtons
+Aspect Ratio: 0.75
+
+C:\Users\macho\Source\Repos\cst116-lab1-M005A\cst116-lab1-Ahmed\x64\Debug\cst116-lab1-Ahmed.exe (process 22412) exited with code 0.
+To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
+Press any key to close this window . . . \ No newline at end of file
diff --git a/cst116-lab1-Ahmed/cst116-lab1-Ahmed.cpp b/cst116-lab1-Ahmed/cst116-lab1-Ahmed.cpp
index 173f464..ee28c60 100644
--- a/cst116-lab1-Ahmed/cst116-lab1-Ahmed.cpp
+++ b/cst116-lab1-Ahmed/cst116-lab1-Ahmed.cpp
@@ -3,7 +3,7 @@
#include <iostream>
-using namespace std;
+
using std::cout;
using std::cin;
@@ -61,7 +61,8 @@ int main()
cout << "The gravitional pull of your kite is: " << grav_pull << " Newtons" << endl;
//Warns if aspect ratio is too high and causes instability
if (aspect_ratio >= 1) {
- cout << "Warning, an aspect ratio of: " << aspect_ratio << " is too high and will provide instability" << endl;
+ cout << "Warning, an aspect ratio of: " << aspect_ratio << " is too high and will provide instability, Try Again" << endl;
+ cout << " " << endl;
range = false;
}
diff --git a/cst116-lab1-Ahmed/cst116-lab1-Ahmed.vcxproj b/cst116-lab1-Ahmed/cst116-lab1-Ahmed.vcxproj
index 2cfcbb5..77dcefa 100644
--- a/cst116-lab1-Ahmed/cst116-lab1-Ahmed.vcxproj
+++ b/cst116-lab1-Ahmed/cst116-lab1-Ahmed.vcxproj
@@ -142,6 +142,7 @@
<ClCompile Include="cst116-lab1-Ahmed.cpp" />
</ItemGroup>
<ItemGroup>
+ <Text Include="cst116-lab1-Ahmed-output.txt" />
<Text Include="cst116-lab1-Ahmed-pseudocode.txt" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
diff --git a/cst116-lab1-Ahmed/cst116-lab1-Ahmed.vcxproj.filters b/cst116-lab1-Ahmed/cst116-lab1-Ahmed.vcxproj.filters
index 8a2983d..6fc6786 100644
--- a/cst116-lab1-Ahmed/cst116-lab1-Ahmed.vcxproj.filters
+++ b/cst116-lab1-Ahmed/cst116-lab1-Ahmed.vcxproj.filters
@@ -23,5 +23,8 @@
<Text Include="cst116-lab1-Ahmed-pseudocode.txt">
<Filter>Source Files</Filter>
</Text>
+ <Text Include="cst116-lab1-Ahmed-output.txt">
+ <Filter>Source Files</Filter>
+ </Text>
</ItemGroup>
</Project> \ No newline at end of file