- 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.
3 Antworten
+ 3
You can submit this in the Lesson Factory.
+ 2
Will keep that in mind next time 😊