Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create 9thOct_Madanaa.java #1891

Merged
merged 1 commit into from
Oct 12, 2021
Merged

Conversation

Madanaa
Copy link
Contributor

@Madanaa Madanaa commented Oct 9, 2021

import java.util.Scanner;
public class Main {
static int factorial(int x)
{
if (x <= 1)
return 1;
int res = 2;
for (int i = 3; i <= x; i++)
res = res * i;
return res;
}

static int gcdFactorial(int m, int n)
{
int min = m < n ? m : n;
return factorial(min);
}

public static void main (String[] args)
{
    
   Scanner sc = new Scanner (System.in);
     int m = sc.nextInt();
     
     int n = sc.nextInt();
     
    System.out.println(gcdFactorial(m, n));
}

}

@vibrantachintya
Copy link
Contributor

Good work. I am merging your PR.

But it will not be considered for Hacktoberfest as our Project is excluded from this contest.

You have contributed during Tathastu OpenFest 2021. If you want the winner certificate kindly Whatsapp me on 9456056603 with this PR id.

Do give us a star by hitting the star button of this repo!

@vibrantachintya vibrantachintya merged commit 883f9b7 into twowaits:master Oct 12, 2021
@Madanaa
Copy link
Contributor Author

Madanaa commented Oct 12, 2021

@vibrantachintya thank you for wonderful advise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants