From 32b89491793163a8396f025b4ef40befdfe2fdb3 Mon Sep 17 00:00:00 2001 From: Musa Ahmed Date: Wed, 19 Oct 2022 17:28:56 -0700 Subject: Added output file --- cst116-lab1-Ahmed/cst116-lab1-Ahmed-output.txt | 28 ++++++++++++++++++++++ cst116-lab1-Ahmed/cst116-lab1-Ahmed.cpp | 5 ++-- cst116-lab1-Ahmed/cst116-lab1-Ahmed.vcxproj | 1 + .../cst116-lab1-Ahmed.vcxproj.filters | 3 +++ 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 cst116-lab1-Ahmed/cst116-lab1-Ahmed-output.txt 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 -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 @@ + 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 @@ Source Files + + Source Files + \ No newline at end of file -- cgit v1.2.3