Name: newfag 2008-02-06 11:02
//grading
float grade = -1.0F;
do {
System.out.print("Input your grade: ");
grade = grade.nextFloat();
if (grade < 0.0F || grade > 1.5F) {
System.err.println("Error: The grade must be between 0.0 and 1.5!");
}
} while (grade < 0.0F || grade > 1.5F);
It's done, but I want it to deal with some cases, like... if the guy inputs a name or something... is it possible to this in java?
thanks
float grade = -1.0F;
do {
System.out.print("Input your grade: ");
grade = grade.nextFloat();
if (grade < 0.0F || grade > 1.5F) {
System.err.println("Error: The grade must be between 0.0 and 1.5!");
}
} while (grade < 0.0F || grade > 1.5F);
It's done, but I want it to deal with some cases, like... if the guy inputs a name or something... is it possible to this in java?
thanks