diff options
| author | WilliamBishopCST116 <[email protected]> | 2022-10-17 15:20:09 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-10-17 15:20:09 -0700 |
| commit | a1686f9401851925985d5fa7df0ff4989b7588ad (patch) | |
| tree | 62d172728722ecb39e0f9e543ad90a8fbe35aeb9 | |
| parent | Update CST116-Lab1-Bishop-Submission11.cpp (diff) | |
| download | cst116-lab1-williambishopcst116-master.tar.xz cst116-lab1-williambishopcst116-master.zip | |
| -rw-r--r-- | CST116-Lab1-Bishop-Psuedocode.txt | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/CST116-Lab1-Bishop-Psuedocode.txt b/CST116-Lab1-Bishop-Psuedocode.txt new file mode 100644 index 0000000..a7e3091 --- /dev/null +++ b/CST116-Lab1-Bishop-Psuedocode.txt @@ -0,0 +1,101 @@ +//William Bishop
+//[email protected] Here we have the name and my contact information
+
+// BlankConsoleLab.cpp : This file contains the 'main' function. Program execution begins and ends there.
+//
+
+#include <iostream> Here we are including the iostream in the program.
+
+using namespace std; Here we are using the namespace std working
+
+
+
+using std::cout;
+using std::cin;
+using std::endl;
+using std::basic_string; Here I am including std works of basic string and cout with cin.
+int main() This is the start of the main function.
+{
+ float mass; Here we have
+ int kite;
+ string sq_meter;
+ int horizontal_kitew;
+ int vertical_kitel; Here we have the integers that are the width and length of the kite with the some more strings.
+
+ cout << "Please enter a width of the kite in cm" << endl;
+ cin >> horizontal_kitew;
+ cout << "Your width is: " << horizontal_kitew << endl; Here we get the width of the kite.
+ cout << "Please enter your length of the kite " << endl;
+ cin >> vertical_kitel;
+ cout << "Our width and the length is: " << horizontal_kitew << "and " << vertical_kitel << endl; Here we have length and width of our kite.
+
+ int areaofkite;
+ areaofkite = (horizontal_kitew * vertical_kitel) ;
+ cout << "The area of the kite is " << areaofkite; Here we have the area of the kite
+ float Area_of_kiteM;
+ Area_of_kiteM = areaofkite / 10000; Here we have the area of the kite in meters instead of centimeters.
+ cout << " " << Area_of_kiteM << endl;
+ float aspectratio;
+ aspectratio = horizontal_kitew / vertical_kitel;
+ cout << " Our aspect ratio is : " << aspectratio << endl; Here we get the aspectratio of the kite
+
+ if (aspectratio >= 1)
+ cout << " WARNING : A lower aspect ratio than 1 would make more stability. " << endl; Here is the work if the aspectratio of the work is from greater than or equal to one
+ //Part two
+
+ float width2;
+ float length2;
+ float area2; Here we have the declarations of the floats from the part two of the program
+
+ cout << "Please enter the width of the kite: "; Here we have the asking for the width of the program
+
+ cout << " Please enter a width of the kite from 1 to 400. " << endl;
+ cin >> width2;
+ if (width2 > 0 && width2 < 401)
+ cout << "Thank you for entering. " << width2; Here we have the entering of the width between 1 to 400 in centimeters
+ else
+ cout << "Please enter the width from 1 to 400. " << endl; If the the width isn't from 1 to 400 we ask again
+ cin >> width2;
+
+ cout << "Please enter the length of the kite: "; Here we ask to get the length of the kite
+
+ cout << " Please enter a length of the kite from 1 to 400. " << endl; If the length isn't from 1 to 400 we ask again.
+ cin >> length2;
+ if (length2 > 0 && length2 < 401)
+ cout << "Thank you for entering. " << length2; Here we have it if the length is inside the number range we asked for.
+ else
+ cout << "Please enter the length from 1 to 400. " << endl; Here we have the length we asking for if isn't the number we want.
+ cin >> length2;
+ area2 = length2 * width2; Here we have the area of the kite.
+ cout << "The area is " << area2; Here we have the work that is the area of the kite inside their time
+
+ float weight;
+ float height;
+ float density; Here we have the floats that are in the in the end of the program
+
+ cout << "Please intput the weight of the kite. ";
+ cin >> weight; Here have the input of the weight of the kite.
+ cout << "Please input the height of the kite " << endl;
+ cin >> height; Here we have the height of the kite.
+ cout << "Please input the density of the kite in kilograms per cubic meter. " << endl;
+ cin >> density; Here we have the density of the kite.
+ cout << "Our density of the kite is " << density << "Our height of the kite is " << height << endl; Here we have the density and height of the kite.
+ float volume;
+ float length2meters;
+ float width2meters; Here we have the length and width for what is inside meters instead of centimeters.
+ length2meters = length2 / 10000;
+ width2meters = width2 / 10000; Right here we have the length and width from meters.
+ area2 = width2meters * length2meters; Here we have the area in square meters.
+ volume = area2 * height; Here we have the volume of the kite in cubic meters.
+ mass = volume * density; Here we have the mass of the kite.
+ cout << "Our mass of our kite is " << mass << endl; Here we have the mass of the kite in kg
+ const int Masspersqmeter = mass;
+
+ cout << " Our mass is " <<mass << endl;
+ float Gravity_Pull;
+ float distance;
+ cout << "Please enter the distance from earth of the kite in meters. "; Here we have the distance and the gravity pull floats with the output of mass.
+ cin >> distance;
+ float Gravity_Pullhelp = mass * mass;
+ Gravity_Pull = (10 * Gravity_Pullhelp) / distance;
+ cout << "The pull on gravity from our kite is " << Gravity_Pull << "m^2/kg^2" << endl; Here we calculate the gravity pull on the kite.
|