From 3d1f01f70b97d6814711437008ca793ae5e5108f Mon Sep 17 00:00:00 2001 From: Judit Chang Date: Thu, 21 Feb 2019 21:10:28 -0500 Subject: [PATCH] fix for loop --- Exercise_06/Exercise_06_10/Exercise_06_10.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Exercise_06/Exercise_06_10/Exercise_06_10.java b/Exercise_06/Exercise_06_10/Exercise_06_10.java index 6153859b..89a32834 100644 --- a/Exercise_06/Exercise_06_10/Exercise_06_10.java +++ b/Exercise_06/Exercise_06_10/Exercise_06_10.java @@ -9,7 +9,7 @@ public static void main(String[] args) { int numberOfPrimes = 0; // Counts the number of prime numbers // Find the number of prime numbers less than 10000 - for (int i = 1; i < 1000; i++) { + for (int i = 2; i < 10000; i++) { if (PrimeNumberMethod.isPrime(i)) numberOfPrimes++; // Increament }