From 103d6c4a6f7894c0c7f404eaf66cc216b2200486 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 13 Sep 2026 21:19:50 +0300 Subject: [PATCH] Added check to ensure accuracy is always positive --- main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/main.cpp b/main.cpp index 06314bc..f7e1139 100644 --- a/main.cpp +++ b/main.cpp @@ -32,6 +32,7 @@ int main(int argc, char *argv[]) correct_guesses.emplace_back(num); accuracy -= abs(user_guess - num) / 100.; + accuracy = accuracy > 0 : -accuracy; num = gen.get_next_num(); }