I've created a method that requests input for a grading and would like 0 to be a valid input result. But my code doesn't allow it? Can anyone help?
public int getValidModuleMark3 ()
{ Scanner input = new Scanner(System.in);
int mark;
System.out.println ("Enter number of compensentable failed credits in range 0 to 180");
mark=input.nextInt();
while (mark < 180) {
System.out.println("Invalid mark !");
System.out.println ("Enter number of compensentable failed credits in range 0 to 180");
mark=input.nextInt();
}
return mark;
}