From 2b8cc204e56bad458a380ec4f628110839ecb8e9 Mon Sep 17 00:00:00 2001 From: Lanhsin Date: Fri, 5 May 2023 17:53:14 +0800 Subject: [PATCH] Update Ex5_12.cpp --- 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; }