From a8b0a22c028170b6dd6ce0c6325eb9f66eb6d9f6 Mon Sep 17 00:00:00 2001 From: Trevor Bouchillon Date: Wed, 5 Oct 2022 15:37:32 -0700 Subject: Debug1 question answered. --- CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp') diff --git a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp index f64adfe..064a99e 100644 --- a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp +++ b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp @@ -1,5 +1,8 @@ /******************************************************************** * File: CST116-Ch7-Debugging.cpp +* +* Trevor Bouchillon +* CST-116 * * General Instructions: Complete each step before proceeding to the * next. @@ -13,6 +16,11 @@ * the value in age is what you typed in. * 5) Step over the if statement. * 6) Why did the value in age change? +* *************************************************************************** +* The value in age changed because because within the if statement age is supposed + to be compared to the age of 1, but the code is actually not comparing but is instead + assigning it the value of 1. +* *************************************************************************** * 7) Fix the problem and repeat Steps 2 – 5 to verify the * problem was corrected. * 8) Stop debugging. -- cgit v1.2.3