Menu
Question Index
...

Write a program to check whether the given numbers are co-primes.

Input (Integer, Integer) Output (boolean)
17, 28 true
42, 31 true
12, 46 false
77, 32 true
16, 42 false



class AreCoPrimes
{
    public static void main(String s[])
    {
        System.out.println("The given numbers are co-primes : " + areCoPrimes(28, 18));

    }


    public static boolean areCoPrimes(int firstNumber, int secondNumber) {
    }
    

}

Doubts

Problems

Topic: Java Methods - Parameter Passing And Scope

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App