I have this code that would randomize the number inputs but should not include 0 and 50 and above digits... how should i do it? Thanks
import java.util.*;
public class RndomA {
public static void main(String[]args){
int[]A=new int [10];
Scanner in=new Scanner(System.in);
System.out.println("Numbers to be randomize:");
for(int a=0;a<A.length;a++){
Random r=new Random();
A[a]=in.nextInt();
int randomPosition = r.nextInt(A.length-1);
if(A[a]<=50 && A[a]>=1){
int temp = A[a];
A[a]= A[randomPosition];
A[randomPosition]=temp;
}
System.out.print(A[randomPosition]+" ");
}
}}