summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliamBishopCST116 <[email protected]>2022-10-17 13:57:26 -0700
committerGitHub <[email protected]>2022-10-17 13:57:26 -0700
commit32fa6e450ba27b4cdd26fc77c795d8d8d5a57d74 (patch)
tree572527566169dec23351e92f5e7beab41e81ab26
parentAdd files via upload (diff)
downloadcst116-lab1-williambishopcst116-32fa6e450ba27b4cdd26fc77c795d8d8d5a57d74.tar.xz
cst116-lab1-williambishopcst116-32fa6e450ba27b4cdd26fc77c795d8d8d5a57d74.zip
Add files via upload
-rw-r--r--CST116-Lab1-Pseudocode-Bishop.txt133
1 files changed, 133 insertions, 0 deletions
diff --git a/CST116-Lab1-Pseudocode-Bishop.txt b/CST116-Lab1-Pseudocode-Bishop.txt
new file mode 100644
index 0000000..98ddf03
--- /dev/null
+++ b/CST116-Lab1-Pseudocode-Bishop.txt
@@ -0,0 +1,133 @@
+//William Bishop
+//[email protected] Here we have the contact information and my name.
+
+// BlankConsoleLab.cpp : This file contains the 'main' function. Program execution begins and ends there.
+//
+
+#include <iostream> Here we are including the iostream.
+
+using namespace std; Here we are using the standard start of the c++ function.
+
+constant int x = mass / sq_meter; This is the constant to print out mass in sqare meter realm
+
+using std::cout; Here we have the cout function happening.
+using std::cin; Here we have the cin function directives.
+using std::endl; Here we have the end line directives
+
+int main() Here is the start of the main function
+{
+ string sq_meter; Here we have the square meter definition string
+ constant int x = mass / sq_meter;
+ int kite; Here we have a kite integer
+ int horizontal_kitew; Here we have the horizontal width of the kite
+ int vertical_kitel; Here we have the length of the kite
+
+ cout << "Please enter a width of the kite" << endl; Here we ask for the width of the kite
+ cin >> horizontal_kitew Here we get the input of the kite
+ cout << "Your width is: " << horizontal_kitew << endl; Here we get the width of the kite output
+ cout << "Please enter your height of the kite " << endl; This is the asking for the length of the kite
+ cin >> vertical_kitel; Here we get the input of the kite
+ cout << "Our width and the height is: " << horizontal_kitew << "and " << vertical_kitel << endl; Here we have the width and length of the kite output.
+
+ int areaofkite;
+ int areaofkite = (horizontal_kitew * vertical_kitel) / 2; Here we have the area of the kite.
+ cout << "The area of the kite is " << areaofkite;
+ float Area_of_kiteM;
+ float Area_of_kiteM = areaofkite / 10000; Here we get the area of the kite in meters.
+ cout << " " << Area_of_kiteM << endl;
+ float aspectratio;
+ float aspectratio = horizontal_kitew / vertical_kitel; Here we have the aspectratio of the kite.
+ cout << " Our aspect ratio is : " << aspectratio << endl;
+
+ if (aspectratio >= 1)
+ cout << " WARNING : A lower aspect ratio than 1 would make more stability. " << endl; Here we output if the aspect ratio is less than one or not.
+ //Part two
+
+ int width2;
+ int length2;
+ float area2; Here we have the width and length for the part two of the kite.
+
+ cout << "Please enter the width of the kite from cm: ";
+
+ cout << " Please enter a width of the kite from 1 to 400. " << endl; Here we get the width of the kite asking inside of the function.
+ cin >> width2;
+ if (width2 > 0 && width2 < 401)
+ cout << "Thank you for entering. " << width2; If the width isn't from 1 to 400 we ask for the width again.
+ else
+ cout << "Please enter the width from 1 to 400. " << endl;
+ cin >> width2;
+
+ cout << "Please enter the length of the kite from cm: "; Here we get the length of the kite asking.
+
+ cout << " Please enter a length of the kite from 1 to 400. " << endl;
+ cin >> length2;
+ if (length2 > 0 && length2 < 401)
+ cout << "Thank you for entering. " << length2; Here get the input of the kite's length and the known else statement if the kite isn't from 1 to 400 in length.
+ else
+ cout << "Please enter the length from 1 to 400. " << endl;
+ cin >> length2;
+ float area2 = length2 * width2;
+ cout << "The area is " << area2; Here we get the area of the kite from part two of the program
+
+ float weight;
+ float mass;
+ float height;
+ float density; Here we have the floats for what is the weight, mass, height, and the density of the kite.
+
+ cout << "Please intput the weight of the kite in kgs. "; Here get the weight of the kite
+ cin >> weight;
+ cout << "Please input the height of the kite meters " << endl; Here we get the height of the kite
+ cin >> height;
+ cout << "Please input the density of the kite in kilograms per cubic meter. " << endl; Here we get the density of the kite.
+ cin >> density;
+ cout << "Our density of the kite is " << density << "Our height of the kite is " << height<<endl;
+ float volume; Here we have the volume float
+ float length2meters;
+ float width2meters;
+ float length2meters = length2 / 10000;
+ float width2meters = width2 / 10000; Here we have our width and length of the kite in meters
+ float area2 = width2meters * length2meters; Here we have the area of the kite
+ float volume = area2 * height; Here we have the volume of the kite
+ float mass = volume * density; Here we have the mass of the kite
+ cout << "Our total mass of our kite is " << mass<<endl; Here we have the total mass of the kite
+ string sq_meter = "sqmeter";
+
+ cout << " Our mass is " << x << endl; Here we output out mass from the constant of what is the string square meter and the mass float.
+ float Gravity_Pull;
+ float distance;
+ cout << "Please enter the distance from earth of the kite in meters. "
+ cin >> distance;
+ Gravity_Pull = (10 * mass^2) / distance;
+ cout << "The pull on gravity from our kite is " << Gravity_Pull << "m^2/kg^2" << endl; Here we get the gravitational pull of the kite.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
+