diff --git a/Basic/Find LCM of Two Numbers/SolutionByGurirath.java b/Basic/Find LCM of Two Numbers/SolutionByGurirath.java new file mode 100644 index 000000000..03d7b4300 --- /dev/null +++ b/Basic/Find LCM of Two Numbers/SolutionByGurirath.java @@ -0,0 +1,24 @@ + +/** + Write a program to print the lcm of two numbers. + */ +import java.util.*; +public class SolutionByGurirath +{ + public static void main(String args[]) + { + Scanner kb= new Scanner(System.in); + int i,n1,n2; + System.out.println("Enter two numbers to check their lcm"); + n1=kb.nextInt(); + n2=kb.nextInt(); + for(i=2;i