How to find Two digit element in this Array int[] abc= {2,1,3,44,52,23}; using For-Loop.

SOLUTION :-

package p3;

public class ArrayTwoDigitCount {

public static void main(String[] args) {

int[] abc= {2,1,3,44,52,23};

for(int i: abc) {

if(i>=10 && i<=99) {

System.out.println(“Two-digit-elements :”+i); }

}

}

}

****************************************************************

Leave a Reply

Your email address will not be published. Required fields are marked *

*