- 1

[CHALLENGE] : Print all primes which adds up to a number

Write a program to print all the combinations of prime numbers(including 1)which can sum up to a number without repeating a number twice. For example : 11+17 = 28 13 + 7+ 5 + 2 + 1 = 28 17 + 5 + 3 +2 + 1 =28 11 + 13 + 3 + 1 = 28 .... you can use any programming language u like. [BONUS] : Print the total number of combinations and total number of primes in each combination.

8th Feb 2019, 6:15 AM
Chinmoy
Chinmoy - avatar
3 Answers
+ 3
You can submit this in the Lesson Factory.
8th Feb 2019, 7:50 AM
Diego
Diego - avatar
8th Feb 2019, 8:12 AM
Denise Roßberg
Denise Roßberg - avatar
+ 2
Will keep that in mind next time 😊
9th Feb 2019, 9:01 AM
Chinmoy
Chinmoy - avatar