From 85c707995e5ff820fb0bf6d898111c4ba7f62396 Mon Sep 17 00:00:00 2001 From: WilliamBishopCST116 <114703314+WilliamBishopCST116@users.noreply.github.com> Date: Mon, 17 Oct 2022 14:43:30 -0700 Subject: Add files via upload --- CST116-Lab1-Bishop-Submission11.cpp | 133 ++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 CST116-Lab1-Bishop-Submission11.cpp diff --git a/CST116-Lab1-Bishop-Submission11.cpp b/CST116-Lab1-Bishop-Submission11.cpp new file mode 100644 index 0000000..eabbe37 --- /dev/null +++ b/CST116-Lab1-Bishop-Submission11.cpp @@ -0,0 +1,133 @@ +//William Bishop +//williambishop@oit.edu + +// BlankConsoleLab.cpp : This file contains the 'main' function. Program execution begins and ends there. +// + +#include + +using namespace std; + + + +using std::cout; +using std::cin; +using std::endl; +using std::basic_string; +int main() +{ + float mass; + int kite; + string sq_meter; + int horizontal_kitew; + int vertical_kitel; + + cout << "Please enter a width of the kite" << endl; + cin >> horizontal_kitew; + cout << "Your width is: " << horizontal_kitew << endl; + cout << "Please enter your height of the kite " << endl; + cin >> vertical_kitel; + cout << "Our width and the height is: " << horizontal_kitew << "and " << vertical_kitel << endl; + + int areaofkite; + areaofkite = (horizontal_kitew * vertical_kitel) / 2; + cout << "The area of the kite is " << areaofkite; + float Area_of_kiteM; + Area_of_kiteM = areaofkite / 10000; + cout << " " << Area_of_kiteM << endl; + float aspectratio; + aspectratio = horizontal_kitew / vertical_kitel; + cout << " Our aspect ratio is : " << aspectratio << endl; + + if (aspectratio >= 1) + cout << " WARNING : A lower aspect ratio than 1 would make more stability. " << endl; + //Part two + + float width2; + float length2; + float area2; + + cout << "Please enter the width of the kite: "; + + 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; + else + cout << "Please enter the width from 1 to 400. " << endl; + cin >> width2; + + cout << "Please enter the length of the kite: "; + + 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; + else + cout << "Please enter the length from 1 to 400. " << endl; + cin >> length2; + area2 = length2 * width2; + cout << "The area is " << area2; + + float weight; + float height; + float density; + + cout << "Please intput the weight of the kite. "; + cin >> weight; + cout << "Please input the height of the kite " << endl; + cin >> height; + cout << "Please input the density of the kite in kilograms per cubic meter. " << endl; + cin >> density; + cout << "Our density of the kite is " << density << "Our height of the kite is " << height << endl; + float volume; + float length2meters; + float width2meters; + length2meters = length2 / 10000; + width2meters = width2 / 10000; + area2 = width2meters * length2meters; + volume = area2 * height; + mass = volume * density; + cout << "Our mass of our kite is " << mass << endl; + const int Masspersqmeter = mass; + + cout << " Our mass is " <> 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; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} + -- cgit v1.2.3