Answers for "java programming "2.4" certain types of boolean statements that allow you to test specific aspects of your code."

0

how to not allow a user to enter a mark greater than 100 or below 0 in java

int[] cw_Mark = new int[6];
    for (int i = 0; i < cw_Mark.length; i++) {
        if (i >= 0 || i <= 100) {
            System.out.println("Please Enter Your Module " + (i+1) + " Coursework Mark: ");
            cw_Mark[i] = input.nextInt();
        } else {
            System.out.println("Please Enter a Number Between 1 and 100");
        }
    }
Posted by: Guest on September-18-2020

Code answers related to "java programming "2.4" certain types of boolean statements that allow you to test specific aspects of your code."

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language