What am I missing with this Prime number counter code using int method? // I'm beginner to Java, sorry if it...
up vote
-5
down vote
favorite
The method it takes two int int arguments.
static int primeCount(int start, int end) {
int count = 0;
for(int i = start; i <= end; i++) {
if(i == 2 || i % 2 != 0)
count++;
}
return count;
}
java
New contributor
put on hold as off-topic by πάντα ῥεῖ, 200_success, Sᴀᴍ Onᴇᴌᴀ, Mast, Martin R 8 hours ago
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – πάντα ῥεῖ, 200_success, Sᴀᴍ Onᴇᴌᴀ, Mast, Martin R
If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
up vote
-5
down vote
favorite
The method it takes two int int arguments.
static int primeCount(int start, int end) {
int count = 0;
for(int i = start; i <= end; i++) {
if(i == 2 || i % 2 != 0)
count++;
}
return count;
}
java
New contributor
put on hold as off-topic by πάντα ῥεῖ, 200_success, Sᴀᴍ Onᴇᴌᴀ, Mast, Martin R 8 hours ago
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – πάντα ῥεῖ, 200_success, Sᴀᴍ Onᴇᴌᴀ, Mast, Martin R
If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
up vote
-5
down vote
favorite
up vote
-5
down vote
favorite
The method it takes two int int arguments.
static int primeCount(int start, int end) {
int count = 0;
for(int i = start; i <= end; i++) {
if(i == 2 || i % 2 != 0)
count++;
}
return count;
}
java
New contributor
The method it takes two int int arguments.
static int primeCount(int start, int end) {
int count = 0;
for(int i = start; i <= end; i++) {
if(i == 2 || i % 2 != 0)
count++;
}
return count;
}
java
java
New contributor
New contributor
edited 10 hours ago
New contributor
asked 10 hours ago
T. Mil
13
13
New contributor
New contributor
put on hold as off-topic by πάντα ῥεῖ, 200_success, Sᴀᴍ Onᴇᴌᴀ, Mast, Martin R 8 hours ago
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – πάντα ῥεῖ, 200_success, Sᴀᴍ Onᴇᴌᴀ, Mast, Martin R
If this question can be reworded to fit the rules in the help center, please edit the question.
put on hold as off-topic by πάντα ῥεῖ, 200_success, Sᴀᴍ Onᴇᴌᴀ, Mast, Martin R 8 hours ago
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – πάντα ῥεῖ, 200_success, Sᴀᴍ Onᴇᴌᴀ, Mast, Martin R
If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes