From 1c3cd2f9fd85875a8ddc2828865676b3fcc3f412 Mon Sep 17 00:00:00 2001 From: parjanyaacoder <46294122+parjanyaacoder@users.noreply.github.com> Date: Sat, 11 Jan 2020 18:37:03 +0530 Subject: [PATCH 1/4] Updated 1 File Implemented Cartesian Product of two sets. --- Cartesian_Product.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Cartesian_Product.c diff --git a/Cartesian_Product.c b/Cartesian_Product.c new file mode 100644 index 0000000..77e5bb9 --- /dev/null +++ b/Cartesian_Product.c @@ -0,0 +1,29 @@ +#include +#include +int main() +{ + int i,j,m,n; + int a[1000000]; + int b[1000000]; + printf("Enter length of set A and B \n"); + scanf("%d%d",&n,&m); + printf("Enter elements of set A \n"); + for(i=0;i Date: Sat, 18 Jan 2020 14:11:46 +0530 Subject: [PATCH 2/4] Added Fibonacci.cpp --- fibonacci.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 fibonacci.cpp diff --git a/fibonacci.cpp b/fibonacci.cpp new file mode 100644 index 0000000..0d65859 --- /dev/null +++ b/fibonacci.cpp @@ -0,0 +1,32 @@ +/****************************************************************************** + + Online C++ Compiler. + Code, Compile, Run and Debug C++ program online. +Write your code in this editor and press "Run" button to compile and execute it. + +*******************************************************************************/ + +#include + +using namespace std; + +void fibo(int a,int b,int n) +{ int c; + if(a<=n) + { + cout<>n; + fibo(0,1,n); + + return 0; +} From a95c110ee9db281376e3882c24bbcf7ffce69aae Mon Sep 17 00:00:00 2001 From: parjanyaacoder <46294122+parjanyaacoder@users.noreply.github.com> Date: Thu, 23 Jan 2020 19:46:36 +0530 Subject: [PATCH 3/4] Added Emrip.cpp --- Emrip.cpp | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Emrip.cpp diff --git a/Emrip.cpp b/Emrip.cpp new file mode 100644 index 0000000..22ba38c --- /dev/null +++ b/Emrip.cpp @@ -0,0 +1,44 @@ +/****************************************************************************** + + Online C++ Compiler. + Code, Compile, Run and Debug C++ program online. +Write your code in this editor and press "Run" button to compile and execute it. + +*******************************************************************************/ + +#include + +using namespace std; + +int prime(int n) +{ + int i=2; + while(i>n; + a=n; + while(a>0) + { + r=r*10+a%10; + a=a/10; + } + if( prime(n) && prime(r)) + { + cout<<"Emrip Number"; + } + else + cout<<"Not an emrip number"; + return 0; +} From ed9da74cb441f92cf37ccb51f51620d3d44fff18 Mon Sep 17 00:00:00 2001 From: parjanyaacoder <46294122+parjanyaacoder@users.noreply.github.com> Date: Wed, 29 Jan 2020 23:42:59 +0530 Subject: [PATCH 4/4] Added DecimalToBinary.cpp Fixes Issue #66 --- decimalToBinary.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 decimalToBinary.cpp diff --git a/decimalToBinary.cpp b/decimalToBinary.cpp new file mode 100644 index 0000000..30550bb --- /dev/null +++ b/decimalToBinary.cpp @@ -0,0 +1,33 @@ +/****************************************************************************** + + Online C++ Compiler. + Code, Compile, Run and Debug C++ program online. +Write your code in this editor and press "Run" button to compile and execute it. + +*******************************************************************************/ + +#include + +using namespace std; + +int main() +{ + int i,j,k,l,m,n,a,b,c; + int arr[1000000]; + cin>>n; + i=0;j=0; + while(n>0) + { + arr[i++]=n%2; + n=n/2; + j++; + } + while(i>=0) + { + cout<