Menu
Question Index
...

Write a program to get the lowest prime factor of a number.

Input(Number) Output(Number)
209 11
493 17
91 7



class LowestPrimeFactor
{
    public static void main(String s[])
    {
        int inputNumber = 209;
        int primeFactor = lowestPrimeFactor(inputNumber);
        System.out.println("The factor is " + primeFactor);

    }


    public static int lowestPrimeFactor(int input)
    {
    }
    public static boolean isPrime(int number)
    {
    }
    
    public static int[] getFactors(int number)
    {
    }

}

Doubts

Problems

Topic: Learn Arrays And Loops

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App