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

Creating pull request #2003

Open
wants to merge 63 commits into
base: revert-514-patch-1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
0d3e148
Intro Page is added
Chandana-23 Oct 1, 2021
190e8ba
1stOct_Chandana-23
Chandana-23 Oct 2, 2021
eb41540
Python file
Chandana-23 Oct 9, 2021
ca34432
Create 9thOct_chetanshahra.py
chetanshahra Oct 9, 2021
756b13a
Create 9oct_surajwakka.py
surajwakka Oct 9, 2021
bb6647f
Create 9thOct_nikhilbz.cpp
NIKHILBz Oct 9, 2021
ff9c8e3
C++ file
Chandana-23 Oct 9, 2021
d6c2a8c
added code for Gcd of two numbers
Pooja-Das Oct 9, 2021
1c4f4df
Create 9thOct_zeel88.cpp
zeel88 Oct 9, 2021
b9565d3
GCD of the factorials of two numbers.
AnupamTekale Oct 9, 2021
fa83b97
Create 9thOct_zeel88.py
zeel88 Oct 9, 2021
4c0fd46
added GCD of two numbers in python
Pooja-Das Oct 9, 2021
6d16cd4
Added Gcd of two numbers
Pooja-Das Oct 9, 2021
f551ae0
Create 9thOct_Farheen15320_.java
Farheen15320 Oct 9, 2021
7528e2d
Create 9thOct_Madanaa.java
Madanaa Oct 9, 2021
382b3b6
9thOct_ssachis.cpp
ssachis Oct 9, 2021
68f3df6
Update 9thOct_ssachis.cpp
ssachis Oct 9, 2021
b6f1c95
9thoct_ssachis.py
ssachis Oct 9, 2021
c136018
solved issue
AnshuPathak-88825 Oct 9, 2021
aa66552
GCD OF TWO NUMBERS
ashutoshmittal26 Oct 9, 2021
51abc49
GCD OF TWO NUMBERS IN PYTHON
ashutoshmittal26 Oct 9, 2021
24dbdd8
Created 9thOct_Paridhicodes.java
Paridhicodes Oct 9, 2021
8f5abbf
Create 9thOct_ssachis.java
ssachis Oct 9, 2021
3e90754
First commit
san-ya Oct 9, 2021
b62dac3
Added GCD of Factorials of 2 numbers by Meet-M-ShAh
Meet-M-ShAh Oct 9, 2021
8f44472
Add files via upload
Srishti-1602 Oct 9, 2021
70a0fcb
Create 9thOct_ujjwalhans.py
ujjwalhans Oct 9, 2021
7b1170c
Update 9thOct_ujjwalhans.py
ujjwalhans Oct 9, 2021
5c80ea1
Delete 9thOct_ujjwalhans.py
ujjwalhans Oct 9, 2021
8ad482a
Create 9thOct_ujjwalhans.py
ujjwalhans Oct 9, 2021
8ebc122
Create 9thOct_ujjwalhans.py
ujjwalhans Oct 9, 2021
e4f03e9
Created HTML page for 10K subscribers
Ronak-Proghammer Oct 9, 2021
ddc25c4
GCD of factorial of two numbers code added
DishaSharma-dev Oct 9, 2021
03427b3
gcd of factorial of two numbers
olive-green Oct 9, 2021
abc0011
Attempted the C++ functionality issue
shagun0915 Oct 9, 2021
0ccedb0
Python Function to find gcd of factorials of two numbers
shagun0915 Oct 9, 2021
e225da6
commit to the first issue
harshita1017 Oct 9, 2021
47b507f
Rename 9thOctharshita1017.py to Python/2021/9thOctharshita1017.py
harshita1017 Oct 9, 2021
1863d13
Merge pull request #1 from harshita1017/harshita1017-patch-1
harshita1017 Oct 9, 2021
dd01cd0
Merge pull request #1907 from harshita1017/master
vibrantachintya Oct 12, 2021
7157dcd
Merge pull request #1906 from NIKHILBz/master
vibrantachintya Oct 12, 2021
6433521
Merge pull request #1905 from shagun0915/master
vibrantachintya Oct 12, 2021
ea4d566
Merge pull request #1904 from olive-green/master
vibrantachintya Oct 12, 2021
622f4d6
Merge pull request #1903 from Ronak-Proghammer/master
vibrantachintya Oct 12, 2021
ce6e0ea
Merge pull request #1902 from DishaSharma-dev/master
vibrantachintya Oct 12, 2021
243afb7
Merge pull request #1901 from ujjwalhans/master
vibrantachintya Oct 12, 2021
90c9b44
Merge pull request #1899 from Srishti-1602/master
vibrantachintya Oct 12, 2021
8146c60
Merge pull request #1897 from Meet-M-ShAh/master
vibrantachintya Oct 12, 2021
2af879d
Merge pull request #1896 from san-ya/master
vibrantachintya Oct 12, 2021
3a5d169
Merge pull request #1895 from Paridhicodes/patch-1
vibrantachintya Oct 12, 2021
9a7b9d9
Merge pull request #1894 from AnshuPathak-88825/feature
vibrantachintya Oct 12, 2021
a24f143
Merge pull request #1893 from ashutoshmittal26/master
vibrantachintya Oct 12, 2021
d4f12c0
Merge pull request #1892 from ssachis/master
vibrantachintya Oct 12, 2021
883f9b7
Merge pull request #1891 from Madanaa/patch-1
vibrantachintya Oct 12, 2021
cf025d3
Merge pull request #1889 from Farheen15320/master
vibrantachintya Oct 12, 2021
ba1e47e
Merge pull request #1888 from Pooja-Das/master
vibrantachintya Oct 12, 2021
27bd8d1
Merge pull request #1887 from Pooja-Das/patch-2
vibrantachintya Oct 12, 2021
45a165f
Merge pull request #1886 from zeel88/master
vibrantachintya Oct 12, 2021
0a18245
Merge pull request #1885 from AnupamTekale/patch-1
vibrantachintya Oct 12, 2021
48c2c80
Merge pull request #1884 from Pooja-Das/patch-1
vibrantachintya Oct 12, 2021
1c4c5a6
Merge pull request #1883 from surajwakka/patch-2
vibrantachintya Oct 12, 2021
0000567
Merge pull request #1882 from chetanshahra/patch-2
vibrantachintya Oct 12, 2021
ac58f93
Merge pull request #1881 from Chandana-23/master
vibrantachintya Oct 12, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions C++/2021/9oct_ashutoshmittal26.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include <bits/stdc++.h>
using namespace std;

int fact(int x) {
if (x < 2)
return 1;
int ans = 2;
for (int i = 3; i <= x; i++)
ans *= i;
return ans;
}

int gcdOfFact(int a, int b) {
if(a<b){
return fact(a);
}
return fact(b);
}

int main() {
int a = 5, b = 120;
cout << gcdOfFact(a, b);
return 0;
}
10 changes: 10 additions & 0 deletions C++/2021/9oct_ashutoshmittal26.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import math

def gcdOfFactorial(m, n) :

return math.factorial(min(m, n))


m = int(input("Enter first no. :"))
n = int(input("Enter secound no. :"))
print(gcdOfFactorial(m, n))
26 changes: 26 additions & 0 deletions C++/2021/9oct_dishasharma-dev.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// CPP program to find GCD of factorial of two
#include <bits/stdc++.h>
using namespace std;

int factorial(int x)
{
if (x <= 1)
return 1;
int res = 2;
for (int i = 3; i <= x; i++)
res = res * i;
return res;
}

int gcdOfFactorial(int m, int n)
{
return factorial(min(m, n));
}

int main()
{
int m = 5, n = 9;
cout << gcdOfFactorial(m, n);
return 0;
}

45 changes: 45 additions & 0 deletions C++/2021/9thOct_AnshuPathak-88825.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#include <iostream>
using namespace std;
int GCD(int num1, int num2)
{
if (num1 == 0)
{
return num2;
}

if (num2 == 0)
{
return num1;
}

if (num1 == num2)
{
return num1;
}

if (num1 > num2)
{
return GCD(num1 - num2, num2);
}

return GCD(num1, num2 - num1);
}
int fact(int n)
{
if (n == 0)
{
return 1;
}
return n * fact(n - 1);
}
int main()
{
int a, b;
cin >> a >> b;
int numfact1 = fact(a);
int numfact2 = fact(b);
int GCDnum = GCD(numfact1, numfact2);
cout << GCDnum;

return 0;
}
23 changes: 23 additions & 0 deletions C++/2021/9thOct_Chandana-23.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include <iostream>
using namespace std;


int factorial(int x)
{
if (x<=1)
{
return 1;
}
return x*factorial(x-1);

}
int main()
{
int a,b;
cin>>a>>b;
a = factorial(a);
b = factorial(b);
int result = a>b?a:b;
cout<<result;
return 0;
}
20 changes: 20 additions & 0 deletions C++/2021/9thOct_Olive-green.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include <bits/stdc++.h>

using namespace std;

long long int fact(int n){

if(n==0){
return 1;
}
return n*fact(n-1);
}

int main(){
int a,b;
cin>>a>>b;
long long int ans=a>b? fact(b) : fact(a);
cout<<ans<<endl;
return 0;
}

24 changes: 24 additions & 0 deletions C++/2021/9thOct_nikhilbz.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// You are given two number a and b, you have to print the GCD of the factorials of these two numbers.

#include <iostream>
using namespace std;
int gcd(int a, int b)
{
if (a == 0)
return b;
if (b == 0)
return a;

if (a == b)
return a;

if (a > b)
return gcd(a-b, b);
return gcd(a, b-a);
}
int main()
{
int a = 98, b = 56;
cout<<"GCD of "<<a<<" and "<<b<<" is "<<gcd(a, b);
return 0;
}
23 changes: 23 additions & 0 deletions C++/2021/9thOct_shagun0915.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include <iostream>
using namespace std;

int factorial(int num){
int fact = 1, i;
for(i=1; i<=num; i++)
fact = fact * i;
return fact;
}
int gcd(int x, int y) {
if (y == 0){
return x;
}
return gcd(y, x % y);
}
int main() {
int a,b;
cin>>a>>b;
int x=factorial(a);
int y=factorial(b);
cout<<gcd(x,y);
return 0;
}
27 changes: 27 additions & 0 deletions C++/2021/9thOct_ssachis.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include <bits/stdc++.h>
#include<iostream>
using namespace std;
int factorial(int x){
if(x<0){
return 0;
}
if(x==0){
return 1;
}

int fact=1;
for(int i=1;i<=x;i++){
fact=fact*i;

}
return fact;

}
int gcdoffact(int m,int n){
return (min(m,n));

}
int main(){

cout<<gcdoffact(5,120);
}
27 changes: 27 additions & 0 deletions C++/2021/9thOct_ujjwalhans.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include <stdio.h>
int factorial(int n)
{
int f = 1;
int i;
for (i = 2; i <= n; i++)
f *= i;
return f;
}
int gcd(int a, int b)
{ if (a == 0)
return b;
if (b == 0)
return a;
if (a == b)
return a;
if (a > b)
return gcd(a-b, b);
return gcd(a, b-a);
}

int main()
{
int a = 5, b = 120;
printf("%d",factorial(gcd(a, b)));
return 0;
}
25 changes: 25 additions & 0 deletions C++/2021/9thOct_zeel88.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#include<iostream>
using namespace std;

int find_factorial(int x)
{
if (x <= 1)
return 1;
int res = 2;
for (int i = 3; i <= x; i++)
res = res * i;
return res;
}

int gcd_Of_factorial(int m, int n)
{
return find_factorial(min(m, n));
}

int main()
{
int i,j;
cin>>i>>j;
cout << gcd_Of_factorial(i, j);
return 0;
}
31 changes: 31 additions & 0 deletions C++/2021/9thSep_Pooja-Das.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Euclidean algo to find GCD of two numbers
#include <iostream>
using namespace std;
// Recursive function to return gcd of a and b
int gcd(int a, int b)
{
// Everything divides 0
//Base case
if (a == 0)
return b;
if (b == 0)
return a;

// base case
if (a == b)
return a;

// a is greater
if (a > b)
return gcd(a-b, b);
return gcd(a, b-a);
}

// Driver program to test above function
int main()
{
int a,b;
cin>>a>>b;
cout<<"GCD of "<<a<<" and "<<b<<" is "<<gcd(a, b);
return 0;
}
Loading