Write Java statements to check if the 5th element of an array X [10] is divisible by 2.
Answers
Answered by
8
Answer:
if ( X[4] %2 ==0 ) { System.out.println( "divisible by 2"); }
else {System.out.println( "not divisible by 2"); }
Similar questions