From ef2dc9b0c314d6676950490e809beb0f106c3112 Mon Sep 17 00:00:00 2001 From: Anuj Jhamb Date: Thu, 10 Oct 2019 00:53:31 +0530 Subject: [PATCH 1/2] Create Summation_of_primes.cpp Solved the question of "finding sum of prime numbers not greater than the input number" using c++ --- Solutions/Summation_of_primes.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Solutions/Summation_of_primes.cpp diff --git a/Solutions/Summation_of_primes.cpp b/Solutions/Summation_of_primes.cpp new file mode 100644 index 0000000..eb1675b --- /dev/null +++ b/Solutions/Summation_of_primes.cpp @@ -0,0 +1,23 @@ +#include +using namespace std; +int main() +{ + int n,sum=0,i,j,c=0; + cin>>n; + for(i=2;i<=n;i++) + { + c=0; + for(j=2;j Date: Fri, 11 Oct 2019 23:55:10 +0530 Subject: [PATCH 2/2] Update Summation_of_primes.cpp --- Solutions/Summation_of_primes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Solutions/Summation_of_primes.cpp b/Solutions/Summation_of_primes.cpp index eb1675b..5e9530b 100644 --- a/Solutions/Summation_of_primes.cpp +++ b/Solutions/Summation_of_primes.cpp @@ -20,4 +20,4 @@ int main() } } cout<