Menu
Question Index
...

Write a program to get the common minimum number between two arrays
Assume that the array contains values between 1 to 100
It returns 101, when there is no common number

Input(First Array, Second Array) Output
{2, 14, 6, 82, 22}, {3, 16, 12, 14, 48, 96} 14
{45, 35, 67, 12, 2}, {100, 76, 23, 67} 67
{183, 164, 105, 125}, {185, 4, 125} 101
{5, 10, 25, 50, 100}, {20, 30, 40, 60, 70, 90} 101



class CommonMinimumNumber
{
    public static void main(String s[])
    {
        int firstArray[] = {2, 14, 6, 82, 22};
        int secondArray[] = {3, 16, 12, 14, 48, 96};
        int number = getCommonMinimumNumber(firstArray, secondArray);
        System.out.println("The number is " + number);

    }


    public static int getCommonMinimumNumber(int firstSeries[], int secondSeries[])
    {
    }

}

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