Find the Divisor of Number

Program:-

package forloop;

public class Divisor {

	public static void main(String[] args) 
	{
       int div=2;
       for(int no=100;div<=100;div++)// div<100-->without 100
       {
    	   if(100%div==0)
    	   {
    	   System.out.println(div);
    	   }
       }
	}

	}

Output Screenshot:-

Leave a Reply

Create your own website, free on WordPress.com.Create your own website.
Start free