/**
 * @(#)Text2.java
 *
 *
 * @author 
 * @version 1.00 2017/10/19
 */


public class Primos 
{

	int Numero = 259;
    public Primos() 
    {
    	 Testa_Numeros(Numero);
    }
    public void Testa_Numeros (int  Num)
    {
    		int aux = (int) Num / 2;  
    		boolean Inversor = false; //Indica que é primo	
    		while (aux > 1)
    		{		
    				if((Num%aux)==0)
    				{
    						System.out.println("O número" + Num + "não é primo, pois, é divisível por"+ aux);
    						aux = 0;
    						Inversor = true;
    				}
    				else
    				{
    						aux = aux -1;
    				}		
    		}	
    		if(Inversor==false)	
    		{
    				System.out.println("O número" + Num + "é primo");
    		}
    }
    
    public static void main (String args [])
    {
    		new Primos();
    }	
    
    
}