diff options
author | RossTheRoss <mstrapp@protonmail.com> | 2019-06-26 11:27:41 -0500 |
---|---|---|
committer | RossTheRoss <mstrapp@protonmail.com> | 2019-06-26 11:27:41 -0500 |
commit | 4929534641e7f547f76545e8b76e4b3c2a1b77ad (patch) | |
tree | e0128c9784f837f14de001c00562da190cc0b280 /ee1301/wk6 | |
parent | Do a thing: (diff) | |
download | homework-4929534641e7f547f76545e8b76e4b3c2a1b77ad.tar homework-4929534641e7f547f76545e8b76e4b3c2a1b77ad.tar.gz homework-4929534641e7f547f76545e8b76e4b3c2a1b77ad.tar.bz2 homework-4929534641e7f547f76545e8b76e4b3c2a1b77ad.tar.lz homework-4929534641e7f547f76545e8b76e4b3c2a1b77ad.tar.xz homework-4929534641e7f547f76545e8b76e4b3c2a1b77ad.tar.zst homework-4929534641e7f547f76545e8b76e4b3c2a1b77ad.zip |
Fix something that wasn't broken
Diffstat (limited to 'ee1301/wk6')
-rw-r--r-- | ee1301/wk6/hw6_directory/strap012_HW6B.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ee1301/wk6/hw6_directory/strap012_HW6B.cpp b/ee1301/wk6/hw6_directory/strap012_HW6B.cpp index a845e45..17a37fd 100644 --- a/ee1301/wk6/hw6_directory/strap012_HW6B.cpp +++ b/ee1301/wk6/hw6_directory/strap012_HW6B.cpp @@ -6,13 +6,14 @@ int ff(int x);
int main() {
- int x;
+ int x, y;
do {
std::cout << "Please enter a value of x: ";
std::cin >> x;
} while (x<0);
std::cout << "Beginning calculation of ff(x)...\n";
- std::cout << "Calcuation complete, ff(x) = " << ff(x) << std::endl;
+ y = ff(x);
+ std::cout << "Calcuation complete, ff(x) = " << y << std::endl;
}
// This function either returns 1 when x is one of two recrusive conditions depending on if x is even or odd.
|