I'm new a java and I was wondering what is wrong with this code here:
1) It says here that "increment" cannot be resolved to a type what does this mean
2) I don't have a clue what to do afterwards in order to figure out perfect numbers like 6 and such.
public class Perfect {
public static void main(String[] args){
int counter1;
int counter2;
while(counter1 <= 1000);
counter1++;
while (counter2 < counter1);
if (counter2 == 0);
increment total;
if (total = counter1);
System.out.print("It is a perfct number");
}
}

New Topic/Question
Reply





MultiQuote





|