A sample run of the code for UserInput = 75.

Program options :

#define MINI_OUTPUT
#define MEGA_OUTPUT
#define ASC_ORDERED
#define TIME_CALC
#define MaxLimit 600

Output :

Code: OUTPUT
`(*) Enter the number (<= 600): 75(~) Found 1 ways of expressing 75 as a sum of 2 primes.-->  { 2, 73 }(~) Found 14 ways of expressing 75 as a sum of 3 primes.-->  { 3, 5, 67 }-->  { 3, 11, 61 }-->  { 3, 13, 59 }-->  { 3, 19, 53 }-->  { 3, 29, 43 }-->  { 3, 31, 41 }-->  { 5, 11, 59 }-->  { 5, 17, 53 }-->  { 5, 23, 47 }-->  { 5, 29, 41 }-->  { 7, 31, 37 }-->  { 11, 17, 47 }-->  { 11, 23, 41 }-->  { 13, 19, 43 }(~) Found 17 ways of expressing 75 as a sum of 4 primes.-->  { 2, 3, 11, 59 }-->  { 2, 3, 17, 53 }-->  { 2, 3, 23, 47 }-->  { 2, 3, 29, 41 }-->  { 2, 5, 7, 61 }-->  { 2, 5, 31, 37 }-->  { 2, 7, 13, 53 }-->  { 2, 7, 19, 47 }-->  { 2, 7, 23, 43 }-->  { 2, 7, 29, 37 }-->  { 2, 11, 19, 43 }-->  { 2, 13, 17, 43 }-->  { 2, 13, 19, 41 }-->  { 2, 13, 23, 37 }-->  { 2, 13, 29, 31 }-->  { 2, 17, 19, 37 }-->  { 2, 19, 23, 31 }(~) Found 22 ways of expressing 75 as a sum of 5 primes.-->  { 3, 5, 7, 13, 47 }-->  { 3, 5, 7, 17, 43 }-->  { 3, 5, 7, 19, 41 }-->  { 3, 5, 7, 23, 37 }-->  { 3, 5, 7, 29, 31 }-->  { 3, 5, 11, 13, 43 }-->  { 3, 5, 11, 19, 37 }-->  { 3, 5, 13, 17, 37 }-->  { 3, 5, 13, 23, 31 }-->  { 3, 5, 17, 19, 31 }-->  { 3, 7, 11, 13, 41 }-->  { 3, 7, 11, 17, 37 }-->  { 3, 7, 11, 23, 31 }-->  { 3, 7, 13, 23, 29 }-->  { 3, 7, 17, 19, 29 }-->  { 3, 11, 13, 17, 31 }-->  { 3, 11, 13, 19, 29 }-->  { 3, 13, 17, 19, 23 }-->  { 5, 7, 11, 23, 29 }-->  { 5, 7, 13, 19, 31 }-->  { 5, 11, 13, 17, 29 }-->  { 5, 11, 17, 19, 23 }(~) Found 16 ways of expressing 75 as a sum of 6 primes.-->  { 2, 3, 5, 7, 11, 47 }-->  { 2, 3, 5, 7, 17, 41 }-->  { 2, 3, 5, 11, 13, 41 }-->  { 2, 3, 5, 11, 17, 37 }-->  { 2, 3, 5, 11, 23, 31 }-->  { 2, 3, 5, 13, 23, 29 }-->  { 2, 3, 5, 17, 19, 29 }-->  { 2, 3, 7, 11, 23, 29 }-->  { 2, 3, 7, 13, 19, 31 }-->  { 2, 3, 11, 13, 17, 29 }-->  { 2, 3, 11, 17, 19, 23 }-->  { 2, 5, 7, 11, 13, 37 }-->  { 2, 5, 7, 11, 19, 31 }-->  { 2, 5, 7, 13, 17, 31 }-->  { 2, 5, 7, 13, 19, 29 }-->  { 2, 7, 11, 13, 19, 23 }(~) Found 1 ways of expressing 75 as a sum of 7 primes.-->  { 3, 5, 7, 11, 13, 17, 19 }----< TOTAL 71 UNIQUE SETS OF PRIMES FOUND, WHICH ADD TO 75. >--------< TIME OF EXECUTION = 0.172 sec. >----`
mayjune, Raj08 likes this