Skip to content

Instantly share code, notes, and snippets.

View mehtaparitosh's full-sized avatar

Paritosh Mehta mehtaparitosh

  • Gurgaon, India
View GitHub Profile
@mehtaparitosh
mehtaparitosh / HCF - LCM (JAVA)
Last active August 24, 2017 05:47
An efficient way to find HCF and LCM
import java.util.Scanner
public class JavaProgram
{
public static void main(String args[])
{
int a, b, x, y, t, hcf, lcm;
Scanner scan = new Scanner(System.in);
System.out.print("Enter Two Number : ");
@mehtaparitosh
mehtaparitosh / HCF - LCM (JAVA)
Created August 24, 2017 05:47
An efficient way to find HCF and LCM
import java.util.Scanner
public class JavaProgram
{
public static void main(String args[])
{
int a, b, x, y, t, hcf, lcm;
Scanner scan = new Scanner(System.in);
System.out.print("Enter Two Number : ");
import java.util.*;
import java.math.*;
class battel
{
int findValue(int x){
BigInteger f = new BigInteger;
f = 1;
for(int i=1;i<=x;i++){
f=f*i;