aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CST116-Ch9-Debugging/CST116-Ch9-Debugging-Preston-Pseduocode.txt36
-rw-r--r--CST116-Ch9-Debugging/CST116-Ch9-Debugging.vcxproj3
-rw-r--r--CST116-Ch9-Debugging/CST116-Ch9-Debugging.vcxproj.filters3
3 files changed, 42 insertions, 0 deletions
diff --git a/CST116-Ch9-Debugging/CST116-Ch9-Debugging-Preston-Pseduocode.txt b/CST116-Ch9-Debugging/CST116-Ch9-Debugging-Preston-Pseduocode.txt
new file mode 100644
index 0000000..0dd3c0a
--- /dev/null
+++ b/CST116-Ch9-Debugging/CST116-Ch9-Debugging-Preston-Pseduocode.txt
@@ -0,0 +1,36 @@
+Pseudocode for Ch9 Debugging
+
+constant int daysperyear = 365
+
+function getage
+function calcdays(age)
+void function printresults(age, days)
+
+main function begin
+ int age = 0
+ int days = 0
+
+ age = getage
+
+ days = calcdays(age)
+
+ printresults(age, days)
+
+getage function begin
+ int age
+
+ print "Please enter your age: "
+ input age
+
+ return age
+
+calcdays function begin (int years)
+ int days
+
+ days = years * daysperyear
+
+ return days
+
+printresults function begin
+ print age + "! Boy you are old!" *new line
+ print "Did you know that you are at least " + days + " days old?" *new line \ No newline at end of file
diff --git a/CST116-Ch9-Debugging/CST116-Ch9-Debugging.vcxproj b/CST116-Ch9-Debugging/CST116-Ch9-Debugging.vcxproj
index d7fabd9..a512593 100644
--- a/CST116-Ch9-Debugging/CST116-Ch9-Debugging.vcxproj
+++ b/CST116-Ch9-Debugging/CST116-Ch9-Debugging.vcxproj
@@ -129,6 +129,9 @@
<ItemGroup>
<ClCompile Include="CST116-Ch9-Debugging.cpp" />
</ItemGroup>
+ <ItemGroup>
+ <Text Include="CST116-Ch9-Debugging-Preston-Pseduocode.txt" />
+ </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
diff --git a/CST116-Ch9-Debugging/CST116-Ch9-Debugging.vcxproj.filters b/CST116-Ch9-Debugging/CST116-Ch9-Debugging.vcxproj.filters
index 2f59736..312e518 100644
--- a/CST116-Ch9-Debugging/CST116-Ch9-Debugging.vcxproj.filters
+++ b/CST116-Ch9-Debugging/CST116-Ch9-Debugging.vcxproj.filters
@@ -19,4 +19,7 @@
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
+ <ItemGroup>
+ <Text Include="CST116-Ch9-Debugging-Preston-Pseduocode.txt" />
+ </ItemGroup>
</Project> \ No newline at end of file