Menu
Question Index
...


Write a program to calculate the LCM of three numbers.

Input(First Number, Second Number) Output
9, 18, 22 198
25, 28, 50 700
12, 14, 16 336

class CalculateLCM

{    public static void main(String s[])
    {
        int result = calculateLcm(5, 10, 15);
        System.out.println("The Lowest Common Multiple is " + result);

    }


public static int calculateLcm(int first, int second, int third)
{
int result = 0;
//Write a code here to calculate the LCM of three numbers and assign it to result.
return result;
}
}

Doubts

Problems

Topic: Java for loops vs Java while loops vs Java do while loops

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App