Menu
Question Index
...

Write a program to find the list of the numbers that form co-primes with the given input number. The numbers should be in the given range.

Input (int, int, int) Output (List)
12, 13, 50 [13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49]
9, 24, 35 [25, 26, 28, 29, 31, 32, 34, 35]
16, 34, 50 [35, 37, 39, 41, 43, 45, 47, 49]
22, 2, 22 [3, 5, 7, 9, 13, 15, 17, 19, 21]
5, 10, 20 [11, 12, 13, 14, 16, 17, 18, 19]


import java.util.*;
class FindCoPrimesOfANumber
{
    public static void main(String s[])
    {
        System.out.println("The list of the numbers which form co-primes with input number are : " + findCoPrimes(11, 12, 20));
        

    }


    public static List<Integer> findCoPrimes(int input, int start, int end) {
    }
    

}

Doubts

Problems

Topic: Java ArrayList

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App