diff options
| -rw-r--r-- | CST116-Ch9-Debugging/CST116-Ch9-Pearse-Pseudocode.txt | 25 | ||||
| -rw-r--r-- | CST116-Ch9-Debugging/CST116-Ch9-Pearse.txt | 8 |
2 files changed, 33 insertions, 0 deletions
diff --git a/CST116-Ch9-Debugging/CST116-Ch9-Pearse-Pseudocode.txt b/CST116-Ch9-Debugging/CST116-Ch9-Pearse-Pseudocode.txt new file mode 100644 index 0000000..c0b10e6 --- /dev/null +++ b/CST116-Ch9-Debugging/CST116-Ch9-Pearse-Pseudocode.txt @@ -0,0 +1,25 @@ +main(){ + int age, days + + age = getAge() + days = calcDays(age) + + printResults(days, age) +} + +int getAge(){ + print("How old are you?") + int age + input(age) + return age +} + +int calcDays(years){ + int days = age * 365 + return days +} + +printResults(days, age){ + print(age + "! Boy are you old!") + print("Did you know that you are at least " + days + " days old?") +}
\ No newline at end of file diff --git a/CST116-Ch9-Debugging/CST116-Ch9-Pearse.txt b/CST116-Ch9-Debugging/CST116-Ch9-Pearse.txt new file mode 100644 index 0000000..439dfce --- /dev/null +++ b/CST116-Ch9-Debugging/CST116-Ch9-Pearse.txt @@ -0,0 +1,8 @@ +Please enter your age: 20 +20! Boy are you old! +Did you know that you are at least 7300 days old? + + +C:\Users\legok\Source\Repos\cst116-ch9-debugging-legokid1503\CST116-Ch9-Debugging\x64\Debug\CST116-Ch9-Debugging.exe (process 21112) 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 |