diff options
| author | prestonderek <[email protected]> | 2022-10-18 10:35:36 -0700 |
|---|---|---|
| committer | prestonderek <[email protected]> | 2022-10-18 10:35:36 -0700 |
| commit | e1d9637ef127b5b6e83cb6114e27e65ca174840f (patch) | |
| tree | 7a4a26158d4ed2d3f5bdc24489e3d6849635fb27 | |
| parent | Exercise 4 complete (diff) | |
| download | cst116-ch9-debugging-prestonderek-e1d9637ef127b5b6e83cb6114e27e65ca174840f.tar.xz cst116-ch9-debugging-prestonderek-e1d9637ef127b5b6e83cb6114e27e65ca174840f.zip | |
Commit pseudocode
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 |