Compare commits

...
2 Commits
Author SHA1 Message Date
alex 2711a8225c Added lottery to .gitignore 2026-09-13 21:20:26 +03:00
alex 103d6c4a6f Added check to ensure accuracy is always positive 2026-09-13 21:19:50 +03:00
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -32,3 +32,4 @@
*.out *.out
*.app *.app
lottery
+1
View File
@@ -32,6 +32,7 @@ int main(int argc, char *argv[])
correct_guesses.emplace_back(num); correct_guesses.emplace_back(num);
accuracy -= abs(user_guess - num) / 100.; accuracy -= abs(user_guess - num) / 100.;
accuracy = accuracy > 0 : -accuracy;
num = gen.get_next_num(); num = gen.get_next_num();
} }