Assignemnt #102 Find Prime

Code

 /// Name: JJ Deng
    /// Period: 6
    /// Program Name: Find Prime Numbers
    /// File Name: FindPrime.java
    /// Date Finished: 3/29/2016
    
   public class FindPrime
{
	public static void main( String[] args )
	{
		for (int i = 0; i < 20; i++)
		{
			System.out.println((i + 1) +" "+ (Prime(i + 1) ? "<" : ""));
		}
	}

	public static boolean Prime(int n)
	{
		for (int i = 2;i < n;i++)
		if (n%i==0) return false;

		return true;
	}

}


    

Picture of the output

Assignment 106