From 47eedecb01026c5363b335c2acbde28d5479caa0 Mon Sep 17 00:00:00 2001 From: abd00l4h <114624309+abd00l4h@users.noreply.github.com> Date: Tue, 18 Oct 2022 19:54:57 -0700 Subject: Add files via upload --- CST116-Ch9-Debugging/CST116-CH9-Output-Havaldar.txt | 3 +++ .../CST116-Ch9-PsuedoCode-Havaldar.txt | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 CST116-Ch9-Debugging/CST116-CH9-Output-Havaldar.txt create mode 100644 CST116-Ch9-Debugging/CST116-Ch9-PsuedoCode-Havaldar.txt diff --git a/CST116-Ch9-Debugging/CST116-CH9-Output-Havaldar.txt b/CST116-Ch9-Debugging/CST116-CH9-Output-Havaldar.txt new file mode 100644 index 0000000..999e391 --- /dev/null +++ b/CST116-Ch9-Debugging/CST116-CH9-Output-Havaldar.txt @@ -0,0 +1,3 @@ +Please enter your age: 18 +18! Boy are you old! +Did you know that you are at least 6570 days old? \ No newline at end of file diff --git a/CST116-Ch9-Debugging/CST116-Ch9-PsuedoCode-Havaldar.txt b/CST116-Ch9-Debugging/CST116-Ch9-PsuedoCode-Havaldar.txt new file mode 100644 index 0000000..658687b --- /dev/null +++ b/CST116-Ch9-Debugging/CST116-Ch9-PsuedoCode-Havaldar.txt @@ -0,0 +1,20 @@ +Start Program + +Initialize constant integer DAYS_PER_YEAR = 365 +Initialize function GetAge() +Initialize function CalcDays(int age) +Initialize function PrintResults(int age, int days) +Initialize integer age = 0 +Initialize integer days = 0 + +run function GetAge() + Ask user for their age and store value as age + return age +run function CalcDays(age) + multiply age by DAYS_PER_YEAR + return days +set output of CalcDays = days +run function PrintResults(days, age) + Output user's age with sentence that tells them how many days they are old at least + +End Program \ No newline at end of file -- cgit v1.2.3