package
com.primesum;
public
class
Main {
static
void
main(String args[]){
int
number =
2
;
count =
0
long
sum =
while
(count <
1000
){
if
(isPrimeNumber(number)){
sum += number;
count++;
}
number++;
System.out.println(sum);
private
boolean
isPrimeNumber(
number){
for
(
i=
; i<=number/
; i++){
(number % i ==
return
false
true
3682913
No comments:
Post a Comment