// CST 116, Lab 1 - Alexandra Apetroaei #include using std::cout; using std::cin; using std::endl; int main() { float width; float length; float area; float mass; float aspect_ratio; float grav_pull; float isStable = true; float range = false; while (isStable == true) { while (range == false) { cout << "Insert width (in centimeters): " << endl; cin >> width; cout << "Insert length (in centimeters): " << endl; cin >> length; if (width < 1 && length < 1 && width > 400 && length > 400) { cout << "Keep range between 1-400." << endl; } else { range = true; break; } } cout << "You entered:" << width << "cm for width and :" << length << "cm for length." << endl; aspect_ratio = (width / length); //Compute total area area = ((width * length) / 2) / 10000; cout << "The area of the kite is: " << area << "in meters squared." << endl; cin >> area; //Compute total mass mass = (area * 135) / 10000; cout << "The mass of your kite is: " << mass << " kilograms." << endl; cin >> mass; //Compute gravitational pull grav_pull = mass * 9.8; cout << "The gravitional pull of your kite is: " << grav_pull << "meters per second squared." << endl; cin >> grav_pull; if (aspect_ratio >= 1) { cout << "Warning: " << aspect_ratio << " is too high and should be lowered to provie stability! " << endl; } else { cout << "Aspect ratio:" << aspect_ratio << endl; break; } } }