Computer Science, asked by aditiporwal, 10 months ago

Hello programmers!!!

Question for u!!!

Please Write a program in java to accept two numbers and find their LCM???

No spam!!!​

Answers

Answered by eveeka
2

Answer:

public class LCM {

public static void main(String[] args) {

int n1 = 72, n2 = 120, lcm;

// maximum number between n1 and n2 is stored in lcm.

lcm = (n1 > n2) ? n1 : n2;

// Always true.

while(true)

Similar questions