

Thread Tools  Search this Thread  Rate Thread 
#1




Write list of composite numbers as sum of 2 prime numbersSo every composite number can be written as a sum of two prime numbers.
http://en.wikipedia.org/wiki/Composite_number http://en.wikipedia.org/wiki/Prime_number Task: User inputs int n, and also composite numbers which are saved in list which length is n. For every composite number of the list print the sum of two prime numbers. Solution: Python Code:
Python Code:


#2




Re: Write list of composite numbers as sum of 2 prime numbersOh I almost forgot.
Sample Input/Output Code:

#3




Re: Write list of composite numbers as sum of 2 prime numbersQuote:
Python Code:
Output Code:
Regards, Dave 
#4




Re: Write list of composite numbers as sum of 2 prime numbersOh yeah.
Thanks Dave. Cheers. 
#5




Re: Write list of composite numbers as sum of 2 prime numbersBeen learning Python while I wasn't looking, eh Dave?
__________________
Start Programming with PythonA beginner's guide to programming and the Python language. Interested in pen & paper role playing games from the "golden age" of gaming? Visit Old School RolePlaying Games 
«
Previous Thread

Next Thread
»
Thread Tools  Search this Thread 
Rate This Thread  



Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Str_Misaligned in Double Link List  Peter_APIIT  C Programming Language  1  29Feb2008 20:50 
Airport Log program using 3D linked List : problem reading from file  batrsau  C Programming Language  11  29Feb2008 07:44 
[Include] Doublylinked List  dsmith  C Programming Language  6  14Apr2006 13:12 
[CONTEST?]Data Structure Test  dsmith  C Programming Language  2  06Jun2004 15:13 
Network Sites: GIDNetwork · GIDApp · GIDBlog · Learning Journal by J de Silva, The
All times are GMT 6. The time now is 02:09.