// BlankConsoleLab.cpp : This file contains the 'main' function. Program execution begins and ends there. // /* Wyatt Johnson CST 116 Lab1 */ #include using namespace std; const float kite_weight = 135; const float gravitational_constant = 9.8; int main() { float width = 0, length = 0; while (width < 1 || width > 400) { cout << "Please input your kites width in centimeters: "; cin >> width; cout << endl; if (width < 1 || width > 400) { cout << "Width cannot be greater than 400 or less than 1." << endl; } } while (length < 1 || length > 400) { cout << "Please input your kites length in centimeters: "; cin >> length; cout << endl; if (length < 1 || length > 400) { cout << "Length cannot be greater than 400 or less than 1." << endl; } } cout << "Your kites width will be: " << width << " cm\nYour kites length will be: " << length << " cm" << endl; float area = ((width * length)/2) / 10000; cout << "The area of your kite in square meters is " << area << endl; float aspect_ratio = width / length; if (aspect_ratio > 1) { cout << "Your aspect ration is greater than 1 (width/length: " << width << "/" << length << " = " << aspect_ratio << ")\nLower aspect ratios will have greater stability." << endl; } float mass = (area * kite_weight) / 10000; cout << "Your kites mass is: " << mass << "kg." << endl; float gravitational_pull = mass * gravitational_constant; cout << "The kites gravitational pull is: " << gravitational_pull << "N/kg." << endl; }