From f312d3961e5d8d5dc98a5ef02e303e94367b4a6c Mon Sep 17 00:00:00 2001 From: zsmate <81351671+zsmate@users.noreply.github.com> Date: Tue, 12 Oct 2021 12:32:41 +0300 Subject: [PATCH] Update Ex5_12.cpp Changing the line to check for positive value. --- Beginning C++ 17 source code/Examples/Chapter 05/Ex5_12.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Beginning C++ 17 source code/Examples/Chapter 05/Ex5_12.cpp b/Beginning C++ 17 source code/Examples/Chapter 05/Ex5_12.cpp index 1f52cb3..998ca43 100644 --- a/Beginning C++ 17 source code/Examples/Chapter 05/Ex5_12.cpp +++ b/Beginning C++ 17 source code/Examples/Chapter 05/Ex5_12.cpp @@ -17,7 +17,7 @@ int main() { std::cout <<"Enter a height: "; std::cin >> height[entered]; - if (height[entered > 0]) // Make sure value is positive + if (height[entered] > 0) // Make sure value is positive { ++entered; }