From 32fa6e450ba27b4cdd26fc77c795d8d8d5a57d74 Mon Sep 17 00:00:00 2001 From: WilliamBishopCST116 <114703314+WilliamBishopCST116@users.noreply.github.com> Date: Mon, 17 Oct 2022 13:57:26 -0700 Subject: Add files via upload --- CST116-Lab1-Pseudocode-Bishop.txt | 133 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 CST116-Lab1-Pseudocode-Bishop.txt 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 +//williambishop@oit.edu Here we have the contact information and my name. + +// BlankConsoleLab.cpp : This file contains the 'main' function. Program execution begins and ends there. +// + +#include 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<> 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. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} + -- cgit v1.2.3