public class JAVA_033 { public static void main(String[] args) { int nValues=50; boolean isPrime=true; System.out.println(\"The Prime Numbers from 1 to 50 are : \"); for(int i=1;i<=nValues;i++) { isPrime=true; for(int j=2;j<i;j++) { if((i%j)==0) { isPrime=false; break; } } if(isPrime) System.out.println(i); } } }