From a5cc8c5299133fd46912e24504f61137830de7df Mon Sep 17 00:00:00 2001 From: George Dallas <104156999+dallasGeorge@users.noreply.github.com> Date: Wed, 27 Dec 2023 22:08:33 +0200 Subject: [PATCH] added a goldbach conjectture algorithm --- C/goldbach_conjecture.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 C/goldbach_conjecture.c diff --git a/C/goldbach_conjecture.c b/C/goldbach_conjecture.c new file mode 100644 index 0000000..546453e --- /dev/null +++ b/C/goldbach_conjecture.c @@ -0,0 +1,38 @@ + + +#include + +int main() +{ + unsigned long long int n,flag,q,jj,flag2,i,j; + scanf("%llu",&n); + if (n<=2||n%2!=0){ + printf("Wrong Input"); + } + else{ + for(i=2;i<=n;i++){ + flag=1; + for (j=2;j