+ 26
[ASSIGNMENT] Check Whether a Number can be Expressed as Sum of Two Prime Numbers
Example to check if an integer (entered by the user) can be expressed as the sum of two prime numbers of """"all possible"""" combinations with the use of functions. Note: A prime number is a positive integer which is divisible only by 1 and itself. For example: 2, 3, 5, 7, 11, 13 P.S: i have already put this as an assignment
12 Answers
+ 25
//old code , so don't mind so many lines of code for simple things 😛
https://code.sololearn.com/czTIFjtzn23y/?ref=app
+ 19
+ 15
https://code.sololearn.com/cKlhNxsB5Oah/?ref=app
+ 10
@Jayden thanks bro <3
wait your code ;-)
+ 5
Python..no short paths this time 😀😉
https://code.sololearn.com/cY9n6QWM2bw5/?ref=app
+ 5
It was a easy one but little bit tricky.
Here is my try :-
If any bugs found please comment.
https://code.sololearn.com/cR2EN348BpkP/?ref=app
+ 4
https://code.sololearn.com/c8Xi6VMLidBt/?ref=app
here I posted my program for checking a number as sum of prime.
+ 4
Oneliner. Gives all the solutions
https://code.sololearn.com/c7fBc1j2vDj6/?ref=app
+ 3
This is related to the Goldbach Conjecture that states that every perfect square can be expressed as a sum of two primes.
For Example:
9 = 3^2 = 2+7
16 = 4^2 = 3 + 13 = 5 + 11
This has neither been proven or disproven till now. Perhaps, if you can prove(or disprove) this conjecture, you will become famous!
0
OldEn Days Code