import java.util.*;
class GFG {
public static void main (String[] args) {
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
int b = scan.nextInt();
int c = a,d=b;
while(a!=b){
if(a>b)
a=a-b;
else
b=b-a;
}
System.out.println("LCM = "+c*d/a);
System.out.println("HCF = "+a);
}
}
Thanks for sharing your
ReplyDeleteknowledge realted to programming
Great work having complete researched material. If you are seeking assignment help services, you can contact team of assignment writers of sourceessay.com anytime. phd thesis croydon
ReplyDelete