diff options
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 5 | ||||
| -rw-r--r-- | CST116-Lab1-Smith-Pseudo-Code.txt | 14 |
2 files changed, 17 insertions, 2 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index 6a0f006..efce74f 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -40,7 +40,7 @@ int main() //Displaying the area in square meters - cout << "The area of the kite in square meters is: " << area << endl << endl; + cout << "The area of the kite will be: " << area << " m^2." << endl << endl; //Setting the aspect ratio of width to length @@ -58,8 +58,9 @@ int main() cout << "The total mass of your kite will be: " << mass << " kg." << endl << endl; + //Calculate then output the gravitational pull of the kite grav_pull = mass * 9.8; - cout << "The gravitational pull on your kite will be: " << grav_pull << "N/kg." << endl; + cout << "The gravitational pull on your kite will be: " << grav_pull << " N/kg." << endl; return 0; diff --git a/CST116-Lab1-Smith-Pseudo-Code.txt b/CST116-Lab1-Smith-Pseudo-Code.txt new file mode 100644 index 0000000..edf209c --- /dev/null +++ b/CST116-Lab1-Smith-Pseudo-Code.txt @@ -0,0 +1,14 @@ +1. Initialize width, length, area, aspect ratio, mass, and gravitational pull variables +2. Initialize a constant 'mass_per' to be .135 (kg / square meter) +3. Gather the input of the kite's width +4. If the input is less than 1 or greater than 400, ask the user to try again +5. Gather the input of the kite's length +6. If the input is less than 1 or greater than 400, ask the user to try again +7. Set variable area to (width * length) / 2 +8. Divide area variable by 10,000 +9. Display the area of the kite as meters squared +10. Set the aspect_ratio variable to width / length +11. If the aspect_ratio varible is ≥ 1, tell the user what the aspect ratio is and tell them that this isn't good for stability of the kite +12. Set mass variable to 'mass_per; * area and output the result in kg +13. Set gravitational pull variable to mass * 9.8 and output the result in N/kg +14. END
\ No newline at end of file |