aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWyatt <[email protected]>2022-10-18 21:38:08 -0700
committerWyatt <[email protected]>2022-10-18 21:38:08 -0700
commit6f38db0180b9d4d6b95024f2d6ffe7a513128d10 (patch)
treecbb11c9866e8948f61caee6c69d7a797dd83e821
parentfinished (diff)
downloadcst116-ch9-debugging-johnson-main.tar.xz
cst116-ch9-debugging-johnson-main.zip
finishingHEADmain
-rw-r--r--.gitignore5
-rw-r--r--CST116-Ch9-Debugging/CST116-Ch9-Debugging-output.txt8
-rw-r--r--CST116-Ch9-Debugging/CST116-Ch9-Debugging-psuedocode.txt32
3 files changed, 45 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..5f32aa2
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+################################################################################
+# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
+################################################################################
+
+/CST116-Ch9-Debugging/.vs/CST116-Ch9-Debugging
diff --git a/CST116-Ch9-Debugging/CST116-Ch9-Debugging-output.txt b/CST116-Ch9-Debugging/CST116-Ch9-Debugging-output.txt
new file mode 100644
index 0000000..cf4b9bc
--- /dev/null
+++ b/CST116-Ch9-Debugging/CST116-Ch9-Debugging-output.txt
@@ -0,0 +1,8 @@
+Please enter your age: 12
+12! Boy are you old!
+Did you know that you are at least 4380 days old?
+
+
+C:\Users\wythe\Desktop\Homework\C++\cst116-ch9-debugging-johnson\CST116-Ch9-Debugging\x64\Debug\CST116-Ch9-Debugging.exe (process 23408) exited with code 0.
+To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
+Press any key to close this window . . . \ No newline at end of file
diff --git a/CST116-Ch9-Debugging/CST116-Ch9-Debugging-psuedocode.txt b/CST116-Ch9-Debugging/CST116-Ch9-Debugging-psuedocode.txt
new file mode 100644
index 0000000..4dc015d
--- /dev/null
+++ b/CST116-Ch9-Debugging/CST116-Ch9-Debugging-psuedocode.txt
@@ -0,0 +1,32 @@
+Constant DAYS_PER_YEAR = 365
+
+int age, days
+
+age = GetAge()
+
+GetAge
+{
+int age
+ask user for age
+set age to user input
+
+return age
+}
+
+days = CalcDays(age)
+
+
+CalcDays(int years)
+{
+int days
+days = years*DAYS_PER_YEAR
+return days;
+}
+
+PrintResults(days, age)
+
+PrintResults(int days, int age)
+{
+print out age,
+print out days.
+} \ No newline at end of file