diff options
Diffstat (limited to 'CST116-Ch9-Debugging-Ahmed/cst116-ch9-Debugging-Ahmed.txt')
| -rw-r--r-- | CST116-Ch9-Debugging-Ahmed/cst116-ch9-Debugging-Ahmed.txt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/CST116-Ch9-Debugging-Ahmed/cst116-ch9-Debugging-Ahmed.txt b/CST116-Ch9-Debugging-Ahmed/cst116-ch9-Debugging-Ahmed.txt new file mode 100644 index 0000000..1d80833 --- /dev/null +++ b/CST116-Ch9-Debugging-Ahmed/cst116-ch9-Debugging-Ahmed.txt @@ -0,0 +1,19 @@ +Start Program + +Initialize a constant integer "DAYS_PER_YEAR" to 365 +Initialize a function GetAge() +Initialize a function CalcDays() which passes the age +Initialize a function PrintResults() which passes age and days, both are ints +Initialize the iintegers age and days + +Run the fucntion GetAge() + Prompt the user for their age + Store it into the variable age +Run the function CalcDays(age) + Perform the multiplication of DAYS_PER_YEAR and age + Return the integer days +Store the output from the previous function to the int days +Run th efunction PrintResults(age,days) + print the users age, and tell them how many days old they are + +End Program
\ No newline at end of file |