From 5dd3fd98623ab65f183be9fb2430c1182cbfabc0 Mon Sep 17 00:00:00 2001 From: Tim Pearse Date: Wed, 19 Oct 2022 21:57:40 -0700 Subject: Change 1 : Pseudocode done --- BlankConsoleLab/BlankConsoleLab.cpp | 2 +- BlankConsoleLab/BlankConsoleLab.vcxproj | 8 ++++---- CST116-Lab1-Pearse-Pseudocode.txt | 27 +++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 CST116-Lab1-Pearse-Pseudocode.txt diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index ed5f807..674db43 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -11,6 +11,6 @@ using std::endl; int main() { - cout << "Hello World!\n"; + } diff --git a/BlankConsoleLab/BlankConsoleLab.vcxproj b/BlankConsoleLab/BlankConsoleLab.vcxproj index db2e734..d2e3ee2 100644 --- a/BlankConsoleLab/BlankConsoleLab.vcxproj +++ b/BlankConsoleLab/BlankConsoleLab.vcxproj @@ -29,26 +29,26 @@ Application true - v142 + v143 Unicode Application false - v142 + v143 true Unicode Application true - v142 + v143 Unicode Application false - v142 + v143 true Unicode diff --git a/CST116-Lab1-Pearse-Pseudocode.txt b/CST116-Lab1-Pearse-Pseudocode.txt new file mode 100644 index 0000000..0e95bdd --- /dev/null +++ b/CST116-Lab1-Pearse-Pseudocode.txt @@ -0,0 +1,27 @@ +const float MASSPERSQUAREMETER = 0.135 + +main(){ + float length + float width + bool leave = false + while(!leave){ + print("Please enter the length, then width of the kite in centimeters.") + input(length) + input(width) + if (1 <= width && width <= 400 && 1 <= length && length <= 400){ + leave = true + } + } + float area = (length * width) / 2 + area = area / 10000 + float aspectratio = width / length + if (aspectratio >= 1){ + print("Warning: a lower aspect ratio will provide more stability.") + } + float mass = MASSPERSQUAREMETER * area + float gravitationalPull = mass * 9.8 + + print("Length of the kite " + length + "cm.") + print("Width of the kite " + width + "cm.") + print("Area of the kite " + area + "m^2.") +} \ No newline at end of file -- cgit v1.2.3