From 4929534641e7f547f76545e8b76e4b3c2a1b77ad Mon Sep 17 00:00:00 2001 From: RossTheRoss Date: Wed, 26 Jun 2019 11:27:41 -0500 Subject: Fix something that wasn't broken --- ee1301/wk6/hw6_directory/strap012_HW6B.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ee1301/wk6/hw6_directory') 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. -- cgit v1.2.3